code:
read location
accepted inputs are
"/home/(10 chars)" or "/(10 chars)" or "(10 chars)"
how to check for valid input? and how to cut the 10 chars from $location variable?
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.
I would use a grep expression like so:
This matches lines which are exactly one of the following cases( caused by the -x ) and doesn’t print the matching line (caused by the -q)
To use this in a script, just drop it in an if statement like so: