> On Thu, 29 Jan 1998 11:36:46 -0600, Bill Sampler
> thousands of dollars to say:
> > This is my first posting to this group so bear with me. I have a text
> >file such as this:
> >|CG12345|0.00|SIX|15.00|
> >Each field is delimited by the "|" (pipe) symbol. What I need to do is
> >to remove the FIRST pipe symbol from each line of this file. Is there a
> >way in awk, perl, shell, etc.
> sed 's/\|//' file > file.new
The | is not a reserved character.
sed -e 's/|//' file [ > new.file ]
If there is a chance that a line will not begin with |, then
sed -e 's/^|//' file should be used to avoid the possibility of
removing one of the embedded symbols.
mp
--
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| sheep, n. A stupid woolly creature, meant to be fleeced; a dupe; |
| an individual who uses 'no-spam' headers in UseNet newsgroups. |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| Linux 2.0.32 -> AMD 5x86-133 | pgpk -a finger://teleport.com/looie |
+=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+