/bin/sh: -c: line 1: unexpected EOF while looking for matching “’
/bin/sh: -c: line 2: syntax error: unexpected end of file
If you receive this error, you may have a % character in your crontab that has not been escaped.
From the crontab(5) manpage:
Percent-signs (%) in the command, unless escaped with backslash (\), will be changed into newline characters, and all data after the first % will be sent to the command as standard input.
useful for ssh key changes
sed -i 215d ~/.ssh/known_hosts
touch -t 200805131808 filename
ls -ltr filename
_rw_rw_rw_ 1 penchal grp 1024 May 13 18:08 filename
date +%Y-%m-%d
2011-07-22
date +%F-%R
2011-07-22-13:48
can be used in tar archives names for example:
tar -cfz /home/backup/backup_`date +%Y-%m-%d`.tar.gz /opt/lampp/htdocs/myweb/*
error:
Setting up grub-pc (1.98-1ubuntu7) …
/etc/default/grub: 19: e: not found
dpkg: error processing grub-pc (–configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
grub-pc
E: Sub-process /usr/bin/dpkg returned an error code (1)
solution:
sudo -i
dpkg --purge --force-depends grub-pc
apt-get install -f
apt-get clean
apt-get -d install grub-pc
cd /var/cache/apt/archives/
dpkg --force-overwrite --install grub-pc*.deb
dpkg --configure -a
exit