The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Pls Help-Script to execute Commands and write to excel file Computer_baby Shell Programming and Scripting 1 01-08-2008 08:34 AM
How to execute multiple commands via ssh srage Shell Programming and Scripting 9 01-05-2008 03:18 AM
Multiple scanners on same input file using lex/flex Rakesh Ranjan High Level Programming 5 12-08-2006 05:53 AM
how do i get my script to execute multiple commands? hvincent Shell Programming and Scripting 1 04-26-2006 08:19 AM
Executing commands with xargs bmopal UNIX for Dummies Questions & Answers 1 08-13-2001 04:05 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-30-2006
nilesrex nilesrex is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 43
Can Xargs execute multiple commands of evry input file

Hello ,

I am trying to print the footer of evry file in the given directory with xargs command like follows

ls -1 | xargs -I {} gzcat {} | tail -1

now problem with this is only last file foooter is getting printed as " | tail -1 " is getting executed for the last file.

I know this can be done in some other ways like looping thru the input files and all but how do we achieve this kind of Piping the out of xargs to a next command for evry input file??


Many Thanks in Advance,

Cheers,
Nilesh
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:53 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0