Re: Removing whitspace from variables in bash?
- From: Ivan Marsh <annoyed@xxxxxxx>
- Date: Mon, 26 Feb 2007 15:42:26 -0600
On Sat, 24 Feb 2007 12:03:13 +0100, Martin Blume wrote:
"IvanMarsh" <annoyed@xxxxxxx> schrieb
Something along the lines of:If there's some way to do this in the original awk line I'd still like
If there's a better solution to stripping a leading space out of
something parsed with awk on a character other than a space that can
strip whitespace that would also be helpful.
to hear about it.
$ echo " a test" | awk '{sub("^ ", "", $0); print $0}' a test
Cool.
Yes sub works a lot better and with less code.
Thanks all.
.
- References:
- Removing whitspace from variables in bash?
- From: IvanMarsh
- Re: Removing whitspace from variables in bash?
- From: IvanMarsh
- Re: Removing whitspace from variables in bash?
- From: Martin Blume
- Removing whitspace from variables in bash?
- Prev by Date: Re: Sony ACID project files <==> linux ??
- Next by Date: google desktop app for linux?
- Previous by thread: Re: Removing whitspace from variables in bash?
- Next by thread: Re: Removing whitspace from variables in bash?
- Index(es):
Relevant Pages
|