linux music tools It is quite possible and was done all the time in the bad
hartmans at mit.edu
Wed Jul 29 12:32:09 UTC 2015
>>>>> "Tony" == Tony Baechler <tony at baechler.net> writes:
Tony> OK, how about this? Even taking into account the differences
Tony> in command names (mv instead of rename, cp for copy, etc) how
Tony> do you make something like this work?
echo Test DOS batch file
if "%1" == "" goto help
echo You must enter a command line parameter.
echo You entered %1.
#in bash labels (functions) need to come before use
echo "You must enter a command line parameter"
if [ "$1" = "" ]; then help
else echo "you entered $1"
Note that functions are not quite like goto. The function returns when
it is done. Put exit at the end of your function if you don't want
However, the same thing in a more bashy way:
if [ "$1" = "" ]; then
echo You must enter a command line parameter
else echo You entered $1
More information about the Blinux-list