Skip to main content

Thread: Shell Script Help


why isn't working ideas?

#!/bin/bash
# script take user input, extension, , remove files specific extension

echo "what extension u remove files names?"
read extension

rename '.$extension' '' *.$extension

echo "extension removed"

this works me:

code:
#!/bin/bash  # script take user input, extension, , remove files specific extension    echo "what extension u remove files names?"  read extension    /usr/bin/rename "s/\.${extension}\$//" *.${extension}    echo "extension removed"


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [other] Shell Script Help


Ubuntu

Comments

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support