Simple Examples

#!/bin/sh

# A simple shell to delete certain garbage files

rm core
rm *.aux
rm *.dvi
rm *.log


#!/bin/bash

# Copy the given file to a save location and change the file permissions

SAVELOC=~/backup/

cp $1 $SAVELOC
chmod 600 $SAVELOC$1

 

#~/bin/bash