Skip to main content
clarity
Source Link
ctrl-alt-delor
  • 28.8k
  • 11
  • 66
  • 113

I have written a one-liner bash script(bright.sh) to manually adjust the display brightness.

Here I take the brightness value from the terminal and pass it as an argument to the echo command. But on running the script, I get an I/O error as follows:

sh: echo: I/O error

What do I do in order to pass the argument successfully from the terminal and control the brightness manually? An example usage might look like:

./bright.sh 230

I have written a one-liner bash script(bright.sh) to manually adjust the brightness.

Here I take the brightness value from the terminal and pass it as an argument to the echo command. But on running the script, I get an I/O error as follows:

sh: echo: I/O error

What do I do in order to pass the argument successfully from the terminal and control the brightness manually? An example usage might look like:

./bright.sh 230

I have written a one-liner bash script(bright.sh) to manually adjust the display brightness.

Here I take the brightness value from the terminal and pass it as an argument to the echo command. But on running the script, I get an I/O error as follows:

sh: echo: I/O error

What do I do in order to pass the argument successfully from the terminal and control the brightness manually? An example usage might look like:

./bright.sh 230

Source Link
ba11b0y
  • 53
  • 1
  • 1
  • 8

I/O error when passing command line argument to a shell script

I have written a one-liner bash script(bright.sh) to manually adjust the brightness.

Here I take the brightness value from the terminal and pass it as an argument to the echo command. But on running the script, I get an I/O error as follows:

sh: echo: I/O error

What do I do in order to pass the argument successfully from the terminal and control the brightness manually? An example usage might look like:

./bright.sh 230