Copy several files to a new filename
for f in *.dist; do cp $f `basename $f .dist`; done
A chronological documentation test project, nothing serious, really!
for f in *.dist; do cp $f `basename $f .dist`; done
#!/bin/bash # Hans-Henry Jakobsen # Script som bl.a resizer bilder og legger de i rett mappe # NB! ikke bruk originalfil da dette script sletter fila # Sjekker at mapper eksisterer if [ ! -d 320 ] then mkdir 320 fi if [ ! -d 480 ] then mkdir 480 fi for file in $(ls|grep […]
#!/bin/bash # Bash shell script to reverse text file contain i.e. concatenate files and # print on the standard output in reverse. This script also demonstrate how # to use arrays under bash shell script. FILE=”$1″ if [ $# -eq 0 ]; then echo “$(basename $0) – file-name” exit 1 fi textArray[0]=”” # hold text […]
#!/bin/bash # # Shell script to rename given file names to from uppercase to # lowercase OR lowercase to uppercase FILES=”$1″ ME=”$(basename $0)” # function to display message and exit with given exit code function die(){ echo -e “$1” exit $2 } # exit if no command line argument given [ “$FILES” == “” ] […]