<HTML> <HEAD> <TITLE>UNIX Shell Scripts for Commonly Used fmbatch Commands - Support Knowledgebase</TITLE> <STYLE> body { background-color: white } </STYLE> <LINK REL="stylesheet" HREF="/ssi/css/win_ie.css"> <SCRIPT LANGUAGE="JavaScript"> </SCRIPT> <META name="title" content="UNIX Shell Scripts for Commonly Used fmbatch Commands"> <META name="docID" content="317072"> <META name="product" content="FrameMaker"> <META name="platform" content="UNIX"> <META name="version" content="5.x"> <META name="description" content="08/13/2001 - You can use fmbatch to open, print, reformat, and save Adobe FrameMaker d ocument s without actually displaying them. You can issue commands one at a time (i"> <META name="keywords" content="317072, FrameMaker, UNIX, batch macro"> </HEAD> <BODY LINK="#cc0000" ALINK="#cc0000" VLINK="#996666" MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0" TOPMARGIN="0">
<IMG SRC="/images/adobelogo.gif" WIDTH="115" HEIGHT="80" BORDER="0" ALT="Adobe">
<IMG SRC="/images/nav/us_supportMainNav.gif" WIDTH="405" HEIGHT="48" USEMAP="#us_supportMainNavMap" BORDER="0" ALT="">
 
<IMG SRC="/images/nav/store/us_storeProfileStatus_none.gif" WIDTH="230" HEIGHT="20" BORDER="0" USEMAP="#us_storeProfileStatus_noneMap">
<MAP NAME="us_storeProfileStatus_noneMap"><AREA SHAPE="rect" ALT="Search" COORDS="82,1,126,15" HREF="/search/main.html"><AREA SHAPE="rect" ALT="Contact us" COORDS="134,2,199,15" HREF="/misc/comments.html"><AREA SHAPE="rect" ALT="Check out cart" COORDS="207,2,227,16" HREF="/store/checkout/cart.jhtml"></MAP>
<IMG SRC="/images/nav/us_supportSubNav.gif" WIDTH="635" HEIGHT="32" USEMAP="#us_supportSubNavMap" BORDER="0" ALT="">
<MAP NAME="us_supportMainNavMap"><AREA SHAPE="rect" ALT="Products" COORDS="13,29,75,43" HREF="/products/main.html"><AREA SHAPE="rect" ALT="Support" COORDS="100,29,160,44" HREF="/support/main.html"><AREA SHAPE="rect" ALT="Purchase" COORDS="182,27,249,44" HREF="/store/main.jhtml"><AREA SHAPE="rect" ALT="Company info" COORDS="275,27,367,44" HREF="/aboutadobe/main.html"></MAP> <MAP NAME="us_supportSubNavMap"><AREA SHAPE="rect" ALT="Downloads" COORDS="102,1,165,14" HREF="/support/downloads/main.html"><AREA SHAPE="rect" ALT="Training" COORDS="175,2,224,13" HREF="/misc/training.html"><AREA SHAPE="rect" ALT="Forums" COORDS="234,1,280,14" HREF="/support/forums/main.html"><AREA SHAPE="rect" ALT="Announcements" COORDS="290,1,387,13" HREF="/support/emaillist.html"><AREA SHAPE="rect" ALT="Survey" COORDS="398,2,443,14" HREF="http://survey.ccsurvey.com/adob0102ai/survey1.pl"></MAP>
<IMG src="/support/images/small.gif" width=10 height=1 border=0> <IMG SRC="/support/images/supportknowledgebase.gif" WIDTH="500" HEIGHT="40" BORDER="0" ALT="Support Knowledgebase">
 
Support Knowledgebase
<IMG SRC="/support/images/arrow.gif" ALT="" WIDTH="10" HEIGHT="10" BORDER="0"> Document 317072
<SPACER TYPE="BLOCK" HEIGHT="10" WIDTH="1">
<SPACER TYPE="BLOCK" HEIGHT="10" WIDTH="1">
Help With Searching


<SCRIPT LANGUAGE="JavaScript"> </SCRIPT><FORM METHOD="POST" ACTION="http://survey.ccsurvey.com/adob0102ai/survey7.pl"><INPUT TYPE="hidden" NAME="URL" VALUE="/support/techdocs/1242e.htm"><INPUT TYPE="hidden" NAME="Title" VALUE="UNIX Shell Scripts for Commonly Used fmbatch Commands"><INPUT TYPE="hidden" NAME="DocID" VALUE="317072"><INPUT TYPE="hidden" NAME="Product" VALUE="FrameMaker"><INPUT TYPE="hidden" NAME="Platform" VALUE="UNIX"><INPUT TYPE="hidden" NAME="Version" VALUE="5.x"><INPUT TYPE="hidden" NAME="LastEdited" VALUE="08/13/2001"><INPUT TYPE="hidden" NAME="Ftype" VALUE="TSDB"><NOSCRIPT><INPUT TYPE="IMAGE" SRC="/support/images/gotsometime.gif" WIDTH="120" HEIGHT="65" BORDER="0" ALT="Got Some Time to Take a Survey?">
Tell us what you think about this document.</NOSCRIPT></FORM>

Product
FrameMaker

Platform
UNIX

Last Edited
08/13/2001

Filename
1242e.htm

  UNIX Shell Scripts for Commonly Used fmbatch Commands

You can use fmbatch to open, print, reformat, and save Adobe FrameMaker documents without actually displaying them. You can issue commands one at a time (interactively), or you can store commands in a text file (i.e., a batch file) and issue all the commands in a single command. For example, the following batch file contains a sequence of commands that will open FileA, save FileA in MIF format, then close FileA and perform the same operation on FileB.

Open FileA
SaveAs m FileA FileA.mif
Quit FileA
Open FileB
SaveAs m FileB FileB.mif
Quit FileB

After creating a batch file, you run fmbatch from a UNIX command line using the batch file name as an argument:

fmbatch batchfile

The following UNIX shell scripts create batch files you can use with the fmbatch command.

- This script builds a batch file that saves all documents in the present working directory in MIF format. Saving in MIF format is useful when it is necessary to open documents in an earlier version of FrameMaker.

#! /bin/csh -f
# C shell script to build an fmbatch command file that
# saves all documents in the current directory as mif files.

set scriptname = createbatch
set batchfile = commands.batch
rm -f $batchfile >& /dev/null
touch $batchfile
foreach f ( * )
# don't add directories or the batch file
if ( ! -d "$f" && "$f" != "$batchfile" ) then
echo "Open $f" >> $batchfile
echo "echo Saving $f to $f.mif" >> $batchfile
echo "SaveAs m $f $f.mif" >> $batchfile
echo "Quit $f" >> $batchfile
endif
end
echo ""
echo "$scriptname is done. See batchfile in $batchfile."

- This script builds a batch file that saves all documents in the present working directory. It is useful after you've upgraded to a later version of FrameMaker as it circumvents the alert message you would get when opening and saving documents interactively.

#! /bin/csh -f
# C shell script to build an fmbatch command file that opens
# and saves all documents in the current directory.

set scriptname = createbatch
set batchfile = commands.batch
rm -f $batchfile >& /dev/null
touch $batchfile
foreach f ( * )
# don't add directories or the batch file
if ( ! -d "$f" && "$f" != "$batchfile" ) then
echo "Open $f" >> $batchfile
echo "echo Saving $f" >> $batchfile
echo "Save $f" >> $batchfile
echo "Quit $f" >> $batchfile
endif
end
echo ""
echo "$scriptname is done. See batchfile in $batchfile."

- This script prints all documents in the present working directory. It assumes you have print settings file named "SetFile" specified. A print settings file is a FrameMaker document that has been saved with the desired print settings configured in the Print dialog box. If a print settings file is not specified, the print settings of individual the documents will be used when printing. However, a print settings file is very useful when it is desirable to print to a PostScript or PDF file.

#! /bin/csh -f
# C shell script to build an fmbatch command file that opens
# and prints all documents in the current directory.

set scriptname = createbatch
set batchfile = commands.batch
rm -f $batchfile >& /dev/null
touch $batchfile
foreach f ( * )
# don't add directories or the batch file
if ( ! -d "$f" && "$f" != "$batchfile" ) then
echo "Open $f" >> $batchfile
echo "echo Printing $f" >> $batchfile
echo "Print $f SetFile" >> $batchfile
echo "Quit $f" >> $batchfile
endif
end
echo ""
echo "$scriptname is done. See batchfile in $batchfile."


Related Records

  <SPACER TYPE="BLOCK" HEIGHT="1" WIDTH="1">  

  <IMG SRC="/images/backtotop.gif" WIDTH="59" HEIGHT="13" BORDER="0" ALT="Back To Top">      
Copyright ©2002 Adobe Systems Incorporated. All rights reserved.
Information is provided "As Is" without warranty of any kind. Users may make a
single copy of portions of knowledgebase for personal use provided that this notice is
included on such copy.
See Terms of Use for additional terms for use.
Online Privacy Policy
Adobe and accessibility
Avoid Software Piracy

</BODY></HTML>

Originally posted as a Categorized Answer.


In reply to Re: Using script to print out a html file by Anonymous Monk
in thread Using script to print out a html file by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.