executing a command with multiple pipes in a perl script?

  • Thread starter Thread starter raghu G
  • Start date Start date
R

raghu G

Guest
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
 
You have to SHOW US YOUR CODE in order for us to have a clue of what you're talking about.
 
Back
Top