LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News
User Name
Password
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.

Notices


Reply
  Search this Thread
Old 02-24-2012, 03:11 PM   #1
LXer
LXer NewsBot
 
Registered: Dec 2005
Posts: 134,820

Rep: Reputation: 128Reputation: 128
LXer: How to get exit status from a piped command in Linux shell


Published at LXer:

It’s funny how through small daily tasks sometimes it happen to find new features or commands that you do not knew not, and today this thing happened to me.In particular, I had to do something trivial on the shell of a server, run : command1 | tail-n 2 i use tail to keep, from a significant long output, only the last 2 lines which then i use in another function, but beyond this, I needed to understand if command1 was terminated with an exit code of 0 or if the code was not 0 which number it was.

Read More...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Testing the Exit Status of a Command LXer Syndicated Linux News 0 11-03-2011 12:40 PM
[SOLVED] Exit status of a piped-background process... acc_Wk Programming 2 09-12-2011 09:26 AM
How can I get exit status from a called shell. dthacker Programming 4 06-27-2008 09:51 AM
LXer: Piped Variable Scoping In The Linux Or Unix Shell LXer Syndicated Linux News 0 06-06-2008 04:10 AM
Shell-script should control a piped command -> PROBLEM waldese Linux - General 8 09-29-2006 03:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News

All times are GMT -5. The time now is 12:25 PM.

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