Various GNU/Linux scripts
Contents
- Pause
- Create a copy of a file with name of the current date
Pause
###############################################################################
pause()
###############################################################################
{
echo ""
echo -n "Press [Enter] to continue"
read PAUSEKEY
desktop_menu
}
###############################################################################
Create a copy of a file with name of the current date
###############################################################################
#!/bin/sh
#
# Create a new copy of a file where the file is the name of the current date.
# In this example we're copying a spreadsheet.
# Version 0.1
#
###############################################################################
###############################################################################
if test -f ~/`date +%d-%m-%Y`.sxc; then
echo "Today's spreadsheet, `date +%d-%m-%Y`.sxc, already exists"
echo "so a new one won't be created!"
pause
else
echo "Created a new fuel sales spreadsheet called `date +%d-%m-%Y`.sxc"
cp ~/FuelSales.sxc ~/`date +%d-%m-%Y`.sxc
pause
fi
###############################################################################