Skip to content
Advertisement

How can I pass in this echo statement into my function in bash?

JavaScript

So in my while loop I am trying to figure out how to pass in the echo statement into my function bitToSixtyFour as a parameter. It is saying that bitToSixtyFour is not found.

Advertisement

Answer

As defined the function takes argument $1 from command line :

JavaScript

to read from standard input read

JavaScript

it would be more efficient to use a variable to avoid creating subshell and pipes

JavaScript

and with question definition

JavaScript
Advertisement