I'm trying to write a program in bash shell which handles a file. I have to call my program from the command line with various ways so they can print specific columns each time. Let's give for example this call:
./prog.sh -f file
my code for this part is
if [[( $1 == '-f') && ( $2 == '<file>')]] ; then
echo "do stuff and print column"
I do get the column I want printed, however I'm also getting the following warning:
[-f command was not found
Any idea on how to remove the error?