Jason Stelzer on 31 Aug 2010 08:21:08 -0700 |
So you want to remove the .cel from the end of each line? echo foo.cel.cel | sed -e 's/\.cel$//;' foo.cel The $ anchor will only remove the .cel if it's the end of the string, that way intermediary and incidental .cel patterns are left alone. So, cat | sed > newfile On Tue, Aug 31, 2010 at 11:17 AM, <Daniel.Roberts@sanofi-aventis.com> wrote: > Hello > It has been a VERY long time that I have done any scripting.. > So if you would..could you please help me out?? > I have a file 1.7 million lines long.. > It contains nothing but filenames with a .CEL extension.. > What I need to do is prepare another file of the same type but with the > .CEL file extension ripped out.. > How can I do this in sed/awk? > Thanks for any help! > Dan > ___________________________________________________________________________ > Philadelphia Linux Users Group     --    Âhttp://www.phillylinux.org > Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce > General Discussion Â--  http://lists.phillylinux.org/mailman/listinfo/plug > -- J. ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|