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
grep and xargs freakygs Shell Programming and Scripting 5 11-23-2007 03:50 AM
find | xargs cat asal_email Shell Programming and Scripting 4 03-17-2005 12:16 AM
Help with xargs JimJim UNIX for Dummies Questions & Answers 4 02-08-2005 07:08 PM
use of xargs command kishorebabu UNIX for Dummies Questions & Answers 5 10-30-2003 02:53 PM
xargs jpprial UNIX for Dummies Questions & Answers 4 09-17-2001 08:29 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-29-2005
shihabvk shihabvk is offline
Registered User
  
 

Join Date: May 2005
Posts: 54
xargs doubt

Hi
Is there any way to append constant string with arguments generated by xargs..

Like I want to delete some files .. where in I have to add directory also ...
ex : echo $fileName | xargs rm $Dir/ValuesFromls
Here I have to append Directory name with filename...

Shihab
  #2 (permalink)  
Old 09-29-2005
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
Why dont you run the ls command as:
Code:
ls $Dir/*
and pipe the output to xargs.
The output of this will be the $Dir/file1 $Dir/file2 ... and so on. So you dont have to append anything anywhere..
Closed Thread

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 11:15 AM.


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