LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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


Reply
  Search this Thread
Old 03-14-2004, 03:41 PM   #1
dtheorem
Member
 
Registered: Sep 2003
Location: Winnipeg, MB, CA
Distribution: LinuxMint
Posts: 101

Rep: Reputation: 15
Multiple commands with exec!


What I want is to be able to run "exec /bin/bash --login +h" and then annother command inside the new shell. I tried "exec /bin/bash --login +h && command", but that ran command after exiting the shell. From a programmers perspective, this is what I have happening:

(exec /bin/bash --login +h) && (command)

What I want is:

exec (/bin/bash --login +h && command)

Please don't ask me why or say "what a stupid thing to do." It's what I want, and what I need. Thank-you.
 
Old 03-14-2004, 03:46 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
What about:
exec ("/bin/bash --login +h -c command");
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I execute two commands on exec of a find? eantoranz Programming 3 08-03-2010 04:51 PM
executing multiple commands by ssh jpan Linux - General 1 10-22-2004 02:12 PM
remote ssh commands on multiple hosts evilchild Linux - Software 6 08-12-2004 10:48 PM
Passing multiple commands to SU adamrad Linux - General 2 03-26-2004 10:53 AM
chaining multiple commands?? puzz_1 Linux - General 9 05-27-2003 11:32 AM

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

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