![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | 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 |
| a question about UNIX 5.0.6 , help me please | mrr53 | UNIX for Dummies Questions & Answers | 1 | 10-25-2007 12:09 AM |
| Unix History Question: Why are filenames/dirnames case sentsitive in Unix? | deckard | UNIX for Dummies Questions & Answers | 3 | 03-26-2005 09:59 AM |
| Unix 10.2 question | egress1 | UNIX for Dummies Questions & Answers | 5 | 07-24-2003 08:15 AM |
| unix to unix serial connection question | typsam | IP Networking | 1 | 10-17-2002 01:39 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Folk;
I'm writing Shell script to extract fields out of log file onto a new file (output file) which i'm going to export into Excel. My question is How can i add a field description to the extracted fields in the output file which i can open using Excel. so when i open it using Excel i can see the column names on the top. for example: let's say the results of the output file will be like this 07:27:2007 Moe John moe@moe.com where: Moe: is the last person who viewed the page John: Is the last person edited the page moe@moe.com: is the e-mail for the last person viewed the field. Now, I'd like the output of the extract to include the description of each field so when i open it using Excel i see on the top what's the field belong to. in other word, what can i add to the script to always include the description on the top of the results? Thanks a lot folks. |
| Forum Sponsor | ||
|
|
|
|||
|
Add a line at the beginning of the loop like:
echo "col1 hdg|col2hdg|col3hdg|" >output.file Use either | as a separator, or the same as you are expecting between the fields on the detail line. |
|||
| Google UNIX.COM |