View previous topic :: View next topic |
Author |
Message |
Johnyp Guru
Joined: 23 Mar 2005 Posts: 301
|
Posted: Sun Apr 02, 2006 10:54 pm Post subject: How to pipe commands? |
|
|
Hey all
I need to restart firewall on a remote box. To do that i need to issue 3 commands. Problem is - if i issue them one by one, i will lose the connection after the first one. So i need to figure out how i can send all 3 of them at once so the box gets them executed and comes back online when it's done.
for example:
~#firewall stop
~#firewall clear
~#firewall start
Thanks _________________ Gentoo Unanswered Questions- Give it a try! |
|
Back to top |
|
|
TwoManAdv n00b
Joined: 03 Oct 2005 Posts: 72 Location: New York
|
Posted: Sun Apr 02, 2006 10:58 pm Post subject: |
|
|
I think for what you are trying to do all you would need to do is
# firewall stop && firewall clear && firewall start
if you were piping commands it would be if you want the result of one command to be passed to another, for example
# cat firewall |grep stop |
|
Back to top |
|
|
Johnyp Guru
Joined: 23 Mar 2005 Posts: 301
|
|
Back to top |
|
|
Soul_rebel Tux's lil' helper
Joined: 12 Nov 2004 Posts: 88
|
Posted: Wed Apr 05, 2006 3:36 pm Post subject: |
|
|
also you can do
command1; command2; command3 _________________ LinuX @ the Speed of Thought |
|
Back to top |
|
|
|