The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
iterate through records using AWK harris2107 Shell Programming and Scripting 6 08-21-2007 07:07 PM
how to put nil at the end of each records. happyv Shell Programming and Scripting 2 07-19-2007 08:20 PM
Count No of Records in File without counting Header and Trailer Records guiguy Shell Programming and Scripting 2 06-07-2007 09:15 AM
temperature records uzerx HP-UX 0 06-06-2006 10:47 AM
A records Deuce UNIX for Dummies Questions & Answers 3 09-25-2001 08:42 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-14-2006
Registered User
 

Join Date: Feb 2006
Posts: 36
Records

Hello there,

I am having a script file running on unix solaris server, this script file is designed to calculate the records of a chosen day. The output will be saved to another file in the form of two columns, as an example, the output may look like:

Account Name Records
Account1 123
Account2 390
Account3 40

and so on.....

I would like to know, if there is any way to output this file to an excel worksheet on my windows desktop in a table format. Also if possible, can we output two files from the unix server to two different sheets in the same excel worksheet??

Is there anyway to do this or it can be applied in unix. Please help me since i wanted this urgently!!!

Your coordination is highly appreciated......
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-14-2006
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,502
You can't create a workbook easily at all.

However, you can create one csv file at a time, then work with them on the PC
Using this as the data input:
Code:
Account1 123
Account2 390
Account3 40

Code:
awk '{printf("\"%s\",%d\n", $1, $2)}' file >newfile.csv
Output:
Code:
"Account1",123
"Account2",390
"Account3",40
Reply With Quote
  #3 (permalink)  
Old 06-26-2006
Registered User
 

Join Date: Feb 2006
Posts: 36
What about if i dont want the comma or the two commas to appear. i,.e, the output to be:
output1 123
output2 333
output3 789

and so on....

what shall be the code in this case?
Reply With Quote
  #4 (permalink)  
Old 06-29-2006
Registered User
 

Join Date: Feb 2006
Posts: 36
thx alot, i have tried what u said and everything seems to be working fine.....
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:05 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0