Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Bash - sed - Remove first word from line which can begin eventually with blank

$
0
0
hello.
How to remove first word from line. The line may or may not start with blank.

Code:

NEW_PARAM1=$(magic-command "    -t --protocol=TCP  -P 12345-u root -h localhost ")
NEW_PARAM2=$(magic-command "-t --protocol=TCP  -P 12345 -u root -h localhost ")

I want NEW_PARAM1 equal to NEW_PARAM2 equal to "--protocol=TCP........"

I don't care the number of blank following the first word.
Code:

"-t --protocol=TCP" or "-t        --protocol=TCP"  or "  -t        --protocol=TCP"
is the same for me.
What is important is to remove the first word and keep the rest as is.

Any help is welcome

Viewing all articles
Browse latest Browse all 16232

Trending Articles