[nylug-talk] need sed help

jh jhlists at hirschman.net
Tue Apr 3 12:28:54 EDT 2007


Works like a charm. Thanks. Can you explain the syntax to me? Would very 
much appreciate it.

jh

Peter C. Norton wrote:
> 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
> 



More information about the nylug-talk mailing list