![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| exporting number into .csv file in text form (no other extra charc) from shell script | Deepak_Rastogi | Shell Programming and Scripting | 5 | 03-13-2008 01:08 PM |
| Extracting data from text file based on configuration set in config file | suparnbector | Shell Programming and Scripting | 3 | 08-09-2007 11:25 PM |
| How to extract data from a text file | negixx | Shell Programming and Scripting | 1 | 07-19-2005 06:30 PM |
| Exporting data | clearchoice | Windows & DOS: Issues & Discussions | 0 | 06-16-2005 10:32 AM |
| getting data out from a text file | skotapal | Shell Programming and Scripting | 7 | 09-14-2002 08:10 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Exporting text file data to csv
Could any one help me in basic shell script to export text file data to csv.
I need to export only particular data from text file to csv column. I am a newbie to UNIX could anyone help me with sample script code |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
post some extract from your data file and the way you wish to see the output.
|
|
#3
|
|||
|
|||
|
elapsed = 76.38 seconds, average = 0.352 seconds, minimum = 0.159 elapsed = 379.005 seconds, average = 0.379 seconds, minimum = 0.157 elapsed = 683.99 seconds, average = 0.455 seconds, minimum = 0.156 elapsed = 1043.271 seconds, average = 0.521 seconds, minimum = 0.154 elapsed = 1408.594 seconds, average = 0.563 seconds, minimum = 0.154
i need to export this data to csv like elapsed average minimum 176.38 0.352 0.159 x.aaa y.aaaa z.aaaa x.aaa y.aaaa z.aaaa x.aaa y.aaaa z.aaaa x.aaa y.aaaa z.aaaa |
|
#4
|
||||
|
||||
|
Try...
Code:
#!/usr/bin/bash
set $(<file1)
while [[ $# -gt 0 ]]
do
echo $3,$7,${11}
shift 11
done
|
||||
| Google The UNIX and Linux Forums |