-
How can I store the result of an an expression into a variable?
echo "hello" > var1 -
Can I also do something like this?
var1.substring(10,15); var1.replace('hello', '2'); var1.indexof('hello')
PS. I had tried Googling, but was not sucessful.
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.
As @larsmans comments,
Konsoleis the terminal emulator, which in turn runs a shell.On linux, this is typically
bash, but it could be something else.Find out what shell you’re using, and print the man page.
For a general introduction, use the wikipedia entry on the unix shell or the GNU Bash refererence
Some specific answers:
And at the risk of showing off:
But this goes beyond simple shell programming.