Re: sed usage question



In article <1imqkpt.13e9ena1htl4ejN%real-address-in-sig@xxxxxxxxxxxxxxx>, Rowland McDonnell wrote:
Gary <postmaster@xxxxxxxxx> wrote:

$ sed -E 's/ /^L^M/g' <afile
a
b
c
d

The above works okay - but I've run into another problem.

I'd like to put the above into a command line script - but the above
stuff's for the Terminal, not TextEdit.

------
#!/bin/sh

sed -E 's/ /^L^M/g' < $1 > $2
------

Call the file whatever you like, 'boris' or something. Don't forget to make it executable ('chmod u+x boris'), then:
$ boris input.txt output.txt

Justin.

--
Justin C, by the sea.
.



Relevant Pages

  • Re: Image manipulationwith GIMP and convert
    ... script which use convert command. ... okay, that will give you filename.gif.png, but should do the trick. ...
    (Fedora)
  • Re: Cron question
    ... >> with at command. ... >> cron with regardless from screen? ... > The best thing I think you can do is to make a script that works, ... Boris Savc ...
    (alt.linux)
  • Re: Sampras vs. Fed exhibition
    ... Connors was afterwards very mad as "Becker did not follow the script". ... I believe the guy in Seattle won more games from Boris than that back ... Boris was playing as good as anyone in the world at that time. ...
    (rec.sport.tennis)
  • Re: System service command line parameters
    ... Does system support any way to store such command line parameters persistenly and use them to start service automatically? ... Those that are stored in the registry as mentioned in Boris' post are those that are passed as the process command line parameters, when the process that hosts the service is started by the SCM. ... Both string vectors are something entirely different: The parameters that ServiceMain gets are passed to the StartService API (by the servicex MMC snap-in for example) whereas those that the service process gets as its command line parameters are specified at service creation time using the CreateService API's lpBinaryPathName parameter, ...
    (microsoft.public.win32.programmer.kernel)
  • Re: sed usage question
    ... Justin C wrote: ... The above works okay - but I've run into another problem. ... stuff's for the Terminal, not TextEdit. ... Call the file whatever you like, 'boris' or something. ...
    (uk.comp.sys.mac)

Loading