13

do you have a better way to set this variable?

view full story
linux-howto

http://www.unix.com – greetings, i have a variable $input that i want to use to set $output. $input is /dir/filename.mph and $input is passed to my script that i manipulate it as follows: Code: input=`basename $input` i want the $output to be filename_solved.mph, basically stuffing "_solved" in the filename. here's how i did it: Code: output=`echo $input | awk -F. '{print $1}'`_solved.mph more informational than anything, but was wondering if there's a more "streamline" way of doing it? (HowTos)