Good day,
New user trying to set things up almost there got stumped on setting up cron job's
wondering if anyone could lend a hand.
I am trying to run the following command and receiving a syntax error.
support@support:/opt/otrs/var/cron$ sudo for foo in *.dist; do cp $foo `basename $foo .dist`; done
-bash: syntax error near unexpected token `do'
OTRS: Version 3.0.10
Ubuntu Server: 11.04
Thanks in advance.
FYI: basically running though this wiki article for the install
http://wiki.otrs.org/index.php?title=In ... %2810.4%29
Help Cron: syntax error near unexpected token `do'
Moderator: crythias
-
- Znuny advanced
- Posts: 106
- Joined: 13 May 2011, 14:47
- Znuny Version: 2.4 / 3.x
- Real Name: Lorenzo Marschall
- Company: bmsoft information technologies GmbH
- Location: Germany, Italy
- Contact:
Re: Help Cron: syntax error near unexpected token `do'
don't mess up with your sudo.
OTRS + ITSM + PostgreSQL @ Debian
Re: Help Cron: syntax error near unexpected token `do'
You're trying to access a whole loop with sudo. Sudo is for swithcing to 'root' to execute something and you can not do it like that. Move 'sudo' right before actual command instead of your loop.
Code: Select all
for foo in *.dist ; do sudo cp $foo `basename $foo .dist`; done