Hey guys, I'm trying to figure out a reasonable way to make a NOT clause in a case. The reason I do this is transcoding when the job is done, otherwise if I hit avi, there is no reason to turn it into avi again, I can just move it to the side (this is what the range should do at the core of my case ) Anyway, I have a protocode that I wrote like that, gives the essence of what I'm trying to do.
#!/bin/bash
for i in $(seq 1 3); do
echo "trying: $i"
case $i in
! 1) echo "1" ;;
! 2) echo "2" ;;
! 3) echo "3" ;;
[1-3]*) echo "! $i" ;;
esac
echo -e "\n"
done
expected results will be something like this
2 3 ! 1
1 3 ! 2
1 2 ! 3
Help evaluate, thanks.
ehime source
share