LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-21-2006, 03:33 PM   #1
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Rep: Reputation: 30
a script


Hi

running testing with 2.6.15, I have this script which I run by
#bash scirptname
echo "working"
exec ifup -a
sleep 5
perl -pi -e 's/"thisIP"/"thatIP"/e' /etc/resolv.conf
echo "done"

it fires up the first 2 liens but not the rest (sleep and the text replacement and the done echo".

how can do this?

thanks
 
Old 03-21-2006, 03:43 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Remove "exec". "man exec" if you want to know what it does.
 
Old 03-21-2006, 03:43 PM   #3
divukman
Member
 
Registered: Sep 2005
Location: Split, Croatia
Distribution: Gentoo/Debian
Posts: 140
Blog Entries: 8

Rep: Reputation: 15
Unhappy

Quote:
Originally Posted by ekdya
Hi

running testing with 2.6.15, I have this script which I run by
#bash scirptname
echo "working"
exec ifup -a
sleep 5
perl -pi -e 's/"thisIP"/"thatIP"/e' /etc/resolv.conf
echo "done"

it fires up the first 2 liens but not the rest (sleep and the text replacement and the done echo".

how can do this?

thanks
I'm no expert in scripting, but this is from man exec:
Quote:
The exec family of functions replaces the current process image with a new process image.
I guess you could try without the exec, just put the ifup -a .
 
  


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
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM
creating shell script that executes as root regardless of who runs the script? m3kgt Linux - General 13 06-04-2004 10:23 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:02 AM.

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