Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to pipe commands?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Johnyp
Guru
Guru


Joined: 23 Mar 2005
Posts: 301

PostPosted: Sun Apr 02, 2006 10:54 pm    Post subject: How to pipe commands? Reply with quote

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
View user's profile Send private message
TwoManAdv
n00b
n00b


Joined: 03 Oct 2005
Posts: 72
Location: New York

PostPosted: Sun Apr 02, 2006 10:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
Johnyp
Guru
Guru


Joined: 23 Mar 2005
Posts: 301

PostPosted: Mon Apr 03, 2006 12:51 am    Post subject: Reply with quote

Thanks a lot!
Yes, i just needed to have them executed one after another. Appreciate the explanation
_________________
Gentoo Unanswered Questions- Give it a try!
Back to top
View user's profile Send private message
Soul_rebel
Tux's lil' helper
Tux's lil' helper


Joined: 12 Nov 2004
Posts: 88

PostPosted: Wed Apr 05, 2006 3:36 pm    Post subject: Reply with quote

also you can do
command1; command2; command3
_________________
LinuX @ the Speed of Thought
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum