LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2008, 09:07 AM   #1
muazfarooqaslam
LQ Newbie
 
Registered: Dec 2007
Posts: 22

Rep: Reputation: 15
Process Substitution not working with echo command


Hi guys,

i am trying to use process substitution ion following code segment, and it's not working

Code:
echo -n "Number of Requests: "
cat  <(wc -l $1)
echo -n "Successfully Processed: "
cat  <(grep "The common subscriber data were added successfully" /opt/mmsc-2.2/bulktool/logging/log |awk -F '|' '{print $7}' | awk -F ':' '{print $3}' | cut -b 18-29 | wc -l)
echo -n "Already Provisioned: "
cat  <(grep "uPower response: Duplicate value" /opt/mmsc-2.2/bulktool/logging/log  | awk -F '|' '{print $7}' | awk -F ':' '{print $3}' | cut -b 5-16 | wc -l)
it is giving following output,

Number of Requests: /dev/fd/63
Successfully Processed: /dev/fd/63
Already Provisioned: /dev/fd/63
Failed Requests:
Please see BulkProv200802042006.res file for details.
./provExpress: line 1: 30854 Exit 1 grep "The common subscriber data were added successfully" /opt/mmsc-2.2/bulktool/logging/log
30855 Done | awk -F '|' '{print $7}'
30859 Done | awk -F ':' '{print $3}'
30861 Done | cut -b 18-29
30862 Broken pipe | wc -l



node1# ./provExpress: line 1: 30857 Done grep "uPower response: Duplicate value" /opt/mmsc-2.2/bulktool/logging/log
30865 | awk -F '|' '{print $7}'
30869 | awk -F ':' '{print $3}'
30871 | cut -b 5-16
30872 Broken pipe | wc -l


Why am i having these weired things (all highlighted in bold)

Please help

thanks
 
Old 02-04-2008, 09:10 AM   #2
muazfarooqaslam
LQ Newbie
 
Registered: Dec 2007
Posts: 22

Original Poster
Rep: Reputation: 15
sorry, pasted wrong code segment. Please see this one,

Code:
echo -n "Number of Requests: "
echo  <(wc -l $1)
echo -n "Successfully Processed: "
echo  <(grep "The common subscriber data were added
successfully" /opt/mmsc-2.2/bulktool/logging/log |awk -F '|' '{print
$7}' | awk -F ':' '{print $3}' | cut -b 18-29 | wc -l)
echo -n "Already Provisioned: "
echo  <(grep "uPower response: Duplicate value" /opt/mmsc-2.2
/bulktool/logging/log  | awk -F '|' '{print $7}' | awk -F ':' '{print
$3}' | cut -b 5-16 | wc -l)
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with Process Substitution and scp - Solaris to Linux sdduuuude Linux - Newbie 3 09-28-2007 10:47 AM
at command: process not working mirat46 Linux - Newbie 4 05-05-2006 12:17 AM
Bash Process Substitution joshholt Programming 4 10-11-2005 03:15 AM
echo command to a running process happy78 Programming 18 09-06-2005 01:03 PM
process substitution jk3us Linux - Software 1 12-02-2004 04:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06: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