![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| piping from C to python in UNIX | Dreams in Blue | High Level Programming | 0 | 05-04-2008 05:02 AM |
| Java with Unix (Redirection + Piping) | fluke_perf | High Level Programming | 3 | 04-30-2008 08:52 AM |
| piping | lnatz | Shell Programming and Scripting | 1 | 07-13-2006 11:30 PM |
| Help (Piping ls, tr, cut) | scan | Shell Programming and Scripting | 2 | 02-11-2006 05:40 AM |
| redirecting/piping | crashnburn | UNIX for Advanced & Expert Users | 3 | 03-25-2002 12:07 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
All,
I am a UNIX novice with a question that I hope you can help me with. I have a UNIX application called "Tole" that formats and displays specific information about customers. I can display the information for up to 30 customers by seperating customer IDs using commas in this format: Tole -c 10,20,30... I would like to have the application pull the values shown after the -c argument from a .csv file (say customers.csv) and run them in groups of 30. Also, I would like the output piped and appended to a results file (say results.csv) as in: Tole -c 10,20,30 >> results.csv. Thank you in advance for your help. Adam |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Code:
#!/bin/ksh
awk -F, '{ for(i=1; i< NF; i++)
if(i%30 == 0 ) {printf("%s\n", $i) }
else {printf("%s,",$i) }
END {print "" }
' | \
while read parms
do
Tole -c "$parms"
done >> result.csv
|
|
#3
|
|||
|
|||
|
Piping in UNIX
Thank you Jim. Can you take me through this command and let me know what directory this needs to go under?
Regards, Adam |
|
#4
|
|||
|
|||
|
Piping in UNIX
Quote:
Can someone tell me if I need to be logged in as root and explain what the commands mean? Thank you, Adam |
|||
| Google The UNIX and Linux Forums |