I have written a one-liner bash script(
bright.sh) to manually adjust the display brightness.
sudo sh -c 'echo "$1" > /sys/class/backlight/intel_backlight/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: