LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Closed Thread
  Search this Thread
Old 09-16-2015, 01:45 AM   #1
N.Rotner
LQ Newbie
 
Registered: Sep 2015
Posts: 3

Rep: Reputation: Disabled
script error (using bash command)


Hi All,
I am trying to run the following script and getting some syntacs errors. Please help me because i am stack.

The script:
----------------
#!/bin/bash

PLAYSMS=$1

if [ -z "$PLAYSMS" ]; then
echo "Usage: $0 <playSMS installation path>"
exit 1
fi

CWD=$(pwd)

##Common strings
cd $PLAYSMS/plugin
touch language/messages.pot
touch language/index.html
xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot ../init.php
xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot ../index.php ##Themes,plugins and tools strings
find ../lib/ -iname "*.php" -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot {} \;cd $PLAYSMS/web/plugin
find ../inc/ -iname "*.php" -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot {} \;find . -type d -name "language" | grep -v "grep" | sed -e "s/\/[^\/]*$//" > /tmp/.lang_folders
find themes/common/ -iname "*.php" -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot {} \;for i in `cat /tmp/.lang_folders` ; do mkdir -p "$i/language" ; done
for i in `cat /tmp/.lang_folders` ; do rm -f "$i/language/messages.pot" ; done
for i in `cat /tmp/.lang_folders` ; do touch "$i/language/messages.pot" ; done
for i in `cat /tmp/.lang_folders` ; do
find $i -iname '*.php' -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o "$i/language/messages.pot" {} \; ;
touch "$i/language/index.html"
done
rm /tmp/.lang_folders
cd $CWD

exit 0

--------------------------------------------------------------------
The Error:
------------
find: missing argument to `-exec'
find: missing argument to `-exec'
1-update-pot-files.sh: line 20: syntax error near unexpected token `do'
1-update-pot-files.sh: line 20: `find themes/common/ -iname "*.php" -exec xgettext -L PHP --omit-header --no-location --sort-output --from-code=utf-8 -j -o language/messages.pot {} \;for i in `cat /tmp/.lang_folders` ; do mkdir -p "$i/language" ; done'
--------------------------------------------------------------------

Thanks,
Nimrod
 
Old 09-16-2015, 02:32 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Duplicate of http://www.linuxquestions.org/questi...nd-4175553626/

Please only post each problem once.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash script - command works directly in command line but not in script raoulcousins Linux - Newbie 6 08-21-2013 07:43 PM
[SOLVED] command not found error when running my bash script thras0 Programming 3 07-28-2012 02:43 PM
[SOLVED] ls command inside bash script error sopier Programming 11 12-17-2011 10:19 PM
[SOLVED] Bash Script Using "date" command error gorrillamcd Linux - Software 3 10-18-2011 07:08 PM
[SOLVED] Using a long Bash command including single quotes and pipes in a Bash script antcore Linux - General 9 07-22-2009 11:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration