I have the following bash script thowring exception: "cut: option requires an argument -- 'f'".
It would cut out the 5th colunm from /etc/passwd, separated by ':' character.
How should I pass the $variable to the option's parameter?
variable=5; cut -d':' -f$variable < /etc/passwd
bashshell.echo $0will say. Also same as thisvariable=5; cut -d: -f$variable /etc/passwdwith extra chars eliminated.