Internet Marketing Business Forum


Internet Marketing Business Forum » MAIN FORUMS » Web Design & Programming » executing a command with multiple pipes in a perl script?
Web Design & Programming Building websites, coding scripts or developing apps? html, css, javascripts, ajax, php, asp, java, c+, C++ and other geeky info is here.

Reply
 
LinkBack Thread Tools Display Modes
Old 07-31-2009, 07:40 PM   #1 (permalink)
 
Status: Junior Member
Join Date: Jul 2009
Posts: 1
raghu G is on a distinguished road
Default executing a command with multiple pipes in a perl script?

I am writing a perl script and have hit a roadblock on my way. I am relatively new to perl. i have a command which is a combination of many commands joined by pipes. it basically looks for a particular id in a huge file. when i run the command on the command line it works perfectly fine but when i put it in the script, it cats the whole file instead of just the id that i need. Any help will be greately appriciated. i am just not able to over come this.
this is the code grep 'DataDictionary' $file | awk -F'<pciOFACViolation>' '{print $1}' | awk '{print $3}' | awk -F'>' '{
print $1}'

$file is a huge data file
raghu G is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-31-2009, 10:30 PM   #2 (permalink)
 martinthurn's Avatar
 
Status: Junior Member
Join Date: Jul 2009
Posts: 13
martinthurn is on a distinguished road
Default

You have to SHOW US YOUR CODE in order for us to have a clue of what you're talking about.
martinthurn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Reply
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB 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 08:59 AM.
Powered by vBulletin® Version 3.7.0 Beta 6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.


Nav Item BG