FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Laptop

 
 
LinkBack Thread Tools
 
Old 09-09-2008, 11:40 AM
"Gopal Ghosh"
 
Default Pipe Commands

Dear All,
my self gopal ghosh a* newbie in Linux world. found myself in love with Linux as i came to know the power of Linux CLI

if two different commands are separated by || (a method by which two comands can be executed one after another )

such as
ls || nano

the above command executes both the command with out stops after executing the first one.

the book says that it will stop executing further after the first command
but it is not the same which i observed

pls help
Thanks
regards



_______________________________________________
Fedora-laptop-list mailing list
Fedora-laptop-list@redhat.com
http://www.redhat.com/mailman/listinfo/fedora-laptop-list
 
Old 09-09-2008, 01:21 PM
Kae Verens
 
Default Pipe Commands

Gopal Ghosh wrote:

Dear All,
my self gopal ghosh a newbie in Linux world. found myself in love with
Linux as i came to know the power of Linux CLI


if two different commands are separated by || (a method by which two
comands can be executed one after another )

such as
ls || nano

the above command executes both the command with out stops after
executing the first one.


the book says that it will stop executing further after the first command
but it is not the same which i observed
pls help


'||' means 'or'. In a list of commands separated by '||', each of the commands are run until one of them succeeds.

as an example:
echo 1 || echo 2

this echoes '1' to the screen, but '2' is /not/ echoed.

in your command, 'nano' should only run if 'ls' fails.

for example, as a normal user, run this:
ls /root || nano

in that case, nano will run, but in this, it won't:
ls ~ || nano

I hope that helps!

kae

_______________________________________________
Fedora-laptop-list mailing list
Fedora-laptop-list@redhat.com
http://www.redhat.com/mailman/listinfo/fedora-laptop-list
 
Old 09-10-2008, 06:02 PM
John Graham
 
Default Pipe Commands

I am having the same problems with network card and and Blue tooth ... just today i could not get my Network working at all .. nothing .. i rebooted in windows and tried it all is workings. Came back in to Fedora 9 and all is working now .. ???? ;?








 Apex North America
* John Graham Engineering Manager
65 South Washington Street, Donora, Pa 15033


Main Number (724) 379-8880 or (866) 273-9872


Fax Number (724) 379-8887 or (866) 273-9329


****** Cell Number (412) 287-8291















On Tue, 2008-09-09 at 17:10 +0530, Gopal Ghosh wrote:

Dear All,

my self gopal ghosh a* newbie in Linux world. found myself in love with Linux as i came to know the power of Linux CLI



if two different commands are separated by || (a method by which two comands can be executed one after another )

such as

ls || nano



the above command executes both the command with out stops after executing the first one.



the book says that it will stop executing further after the first command

but it is not the same which i observed

pls help

Thanks

regards










_______________________________________________
Fedora-laptop-list mailing list
Fedora-laptop-list@redhat.com
http://www.redhat.com/mailman/listinfo/fedora-laptop-list




_______________________________________________
Fedora-laptop-list mailing list
Fedora-laptop-list@redhat.com
http://www.redhat.com/mailman/listinfo/fedora-laptop-list
 

Thread Tools




All times are GMT. The time now is 12:16 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org