[nylug-talk] need sed help
Peter C. Norton
spacey-nylug at lenin.net
Tue Apr 3 12:25:19 EDT 2007
Does this not work for you?
gnu sed '1s/^[ \t]*//'
-Peter
On Tue, Apr 03, 2007 at 12:09:42PM -0400, jh wrote:
> I'm trying to use sed to delete all the whitespace, up to the first
> non-white character, on the first line of a file, and I can't make it
> work. Can someone show me what will work?
>
> Tried this:
>
> sed -e 's/[\t]//1' problem.txt > out.txt
> sed -e 's/[\020]*//1' problem.txt > out.txt
> sed -e 's/[:space:]*//1' problem.txt > out.txt
>
> No dice. This is on an MS-DOS formatted text file...
>
> Thanks~
>
> jh
>
> _____________________________________________________________________________
> Hire expert Linux talent by posting jobs here :: http://jobs.nylug.org
> The nylug-talk mailing list is at nylug-talk at nylug.org
> The list archive is at http://nylug.org/pipermail/nylug-talk
> To subscribe or unsubscribe: http://nylug.org/mailman/listinfo/nylug-talk
--
The 5 year plan:
In five years we'll make up another plan.
Or just re-use this one.
More information about the nylug-talk
mailing list