>I have a question with sed script files. I have a script file that is
>700 lines long . Sed doesnt take in more than 200 line long script files
>- so i split the sed.cmds into 4 smaller files. But now, sed refuses to
>take in multiple script files.
>If I give something like
>sed -f s.cmds* blahblah.sdl
>where there are s.cmdsaa and s.cmdsab files in the directory.
So, after the shell does its filename expansions, sed will see
the command line:
sed -f s.cmdsaa s.cmdsab s.cmdsac s.cmdsad blahblah.sdl
and interprets only the file named immediately after the "-f"
as the name of a sed script, and the remaining files as inputs
(as you discovered).
Then if you change that to:
sed -f s.cmdsaa -f s.cmdsab -f s.cmdsac -f s.cmdsad blahblah.sdl
you wind up with a single 700 line sed script, that just happens
to reside in four seperate files. No win there.
If your four s.cmdsa? files are self-contained sed scriptlets
(without, say, splitting a command block across file boundaries
or the need to do inter-file branching) then you could:
sed -f s.cmdsaa blahblah.sdl | sed -f s.cmdsab |
sed -f s.cmdsac | sed -f s.cmdsad
Perhaps a better option is to switch to a sed which does not
have such an arbritrary restriction on the number of statements
in a script, such as GNU sed.