This code will give the first part, but how to remove it, and get the whole string without the first part?
echo "first second third etc"|cut -d " " -f1
This code will give the first part, but how to remove it, and get the whole string without the first part?
echo "first second third etc"|cut -d " " -f1
Try this:-
You can do:
You can use substring removal for that, no need for external tools:
You should have a look at
info cut
, which will explain whatf1
means. Also, a same question here: question-7814205Actually we just need fields after(and) the second field.
-f
tells the command to search by field, and2-
means the second and following fields.Try doing this :
It's explained in
As far of you have the bash tag, you can use bash parameter expansion like this :