LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-15-2007, 05:00 AM   #16
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97

Your second 'if' is missing its 'then'.

You might want to take a look at the ABSG:
http://tldp.org/LDP/abs/html/

Dave
 
Old 05-15-2007, 06:02 AM   #17
timmy01
LQ Newbie
 
Registered: Sep 2003
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ilikejam
Your second 'if' is missing its 'then'.

You might want to take a look at the ABSG:
http://tldp.org/LDP/abs/html/

Dave

i got it pretty much working now except for the prompt:

for f in `find . -type f`;
do if grep "http://www.\$domain.com/nl/dirs/file_nl.php?loc=\$Var&var=\$var&file=file" "$f";
then read ANSWER; if [ "x$ANSWER" == "xyes" ];
sed -i 's/http:\/\/www.$domain.com\/nl\/
/http:\/\/www.$domain.com\/NL\//g' "$f";
fi; done

i get an error:
-bash: syntax error near unexpected token `fi'

or this

for f in `find . -type f`;
do if grep "http://www.\$domain.com/nl/dirs/file_nl.php?loc=\$Var&var=\$var&file=file" "$f";
read ANSWER; if [ "x$ANSWER" == "xyes" ];
then sed -i 's/http:\/\/www.$domain.com\/nl\/
/http:\/\/www.$domain.com\/NL\//g' "$f";
fi; done

keep returning an error:
-bash: syntax error near unexpected token `done'
 
Old 05-15-2007, 08:10 AM   #18
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
In the first bit, you're missing a 'then' after your second 'if'.

In the second bit, you're missing a 'then' after your first 'if'.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
AWK/SED Multiple pattern matching over multiple lines issue GigerMalmensteen Programming 15 12-03-2006 05:08 PM
Changing extension of multiple files harisund Programming 17 06-01-2006 10:59 AM
changing case in sed phoenix7 Linux - Software 8 08-30-2005 07:18 AM
changing ownership and group of multiple files.. utanja Debian 3 02-21-2005 06:10 PM
changing extension of multiple files shaggystyle Linux - General 5 01-29-2004 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:49 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