Bash parameter for script -
I would like to execute a program that launches, asks for a number, and then my number is out of output .
For example:
Bob @ Bobby: ~ $ ./programm Number: 123456 654321! Bob @ Bobby: ~ $ `
How can I make a Bash script to execute the program with the selected number? It seems to me that I execute that code like ./ programm 123456
but I can not put my number in the parameter, so there is a way to launch the program, then I chose The number entered is automatically written, then valid?
The first argument given to the command will be found in the undergoing parameter $ 1
As stated in the comments, you can use the rev
command to change the sequence of characters in the string. Your script may look something like
#! / Bin / bash printf "% s!" "$ (Rev" $ 1 ")"
Comments
Post a Comment