Bash Program hangs after if statement
I am new to bash and I have a program that sorts a csv file then prints it
or saves it based on input. But it keeps on hanging on it after the if
statement for the saving.
if [ "$1" = "-f" ]; then
sort -r -t, -k5 $1>sorted.csv
elif [ "$2" = "" ]; then
sort -r -t, -k5 $1
fi
should it not be sorting the file $1 and saving it to sorted.csv? The elif
work?
No comments:
Post a Comment