As Alex notes below - what you probably meant was "|"
--- Begin Message ---
- Subject: Re: Pipe Commands
- From: Alex <alex.tsr@xxxxxxxxx>
- Date: Tue, 09 Sep 2008 16:30:38 +0300
- Delivered-to: kae@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=mwx4QKw86dnRwmupg/OmJ3hAtxQxsV8pqnAXVTijH5E=; b=hrhgzM8EmxJdO2Ynvu0vIPyUtgt3fkLXxnwJjLPxMHXMkxddqlfSXzJDJohANu6Lk/ Ixf51Iot3gB1ImW1uuKNPiTbobGmciMM++5PC93gsTZCqEeo7tHyMK18E4lLkQTXpqc6 F57PvHyEWGSqChrDtl9Pgrdzw4Xkp3PWkZR4g=
- In-reply-to: <48C67852.2020902@xxxxxxxxxx>
- References: <68e4e2330809090440g218d70dw262ed1581d35fdf@xxxxxxxxxxxxxx> <48C67852.2020902@xxxxxxxxxx>
On Tue, 2008-09-09 at 14:21 +0100, Kae Verens wrote:
> 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
and since the email is titled "Pipe Commands" I guess what you really
want is '|' which will take the output from the first command and feed
it to the second, in other words pipe it.
Cheers, Alex.
--- End Message ---
_______________________________________________
Fedora-laptop-list mailing list
Fedora-laptop-list@xxxxxxxxxx
http://www.redhat.com/mailman/listinfo/fedora-laptop-list