I am trying this:
echo "This is test" | cut -f 1
and it is not cutting anything, I get this:
This is test
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
By default,
cutdoesn’t split on space, only on tab. If you tell it to split on space, then it won’t split on tab. Also, consecutive spaces or tabs will add empty fields to the set.If you want to split on "any amount of any kind of whitespace", you’re better off with
awk:Also, you can replace
echo…|with<<<in bash: