I have to call a binary several times with a different argument in a shell script.
For example i have to call the binary “set” with the arguments:
set 0x00
set 0x01
set 0x02
…
set 0x60
Is it possible to do that with a loop in the shell script?
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.
Use the
%xformat to theprintfcommand to do the conversion, as inprintf 0x%x num. To pass the converted value as argument to another command, use the$(...)executive quotes: