The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 10:07 PM
how to put nil at the end of each records. happyv Shell Programming and Scripting 2 07-19-2007 11:20 PM
Count No of Records in File without counting Header and Trailer Records guiguy Shell Programming and Scripting 2 06-07-2007 12:15 PM
temperature records uzerx HP-UX 0 06-06-2006 01:47 PM
A records Deuce UNIX for Dummies Questions & Answers 3 09-25-2001 11:42 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-14-2006
charbel charbel is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 41
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......
  #2 (permalink)  
Old 06-14-2006
jim mcnamara jim mcnamara is online now Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,716
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
  #3 (permalink)  
Old 06-26-2006
charbel charbel is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 41
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?
  #4 (permalink)  
Old 06-29-2006
charbel charbel is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 41
thx alot, i have tried what u said and everything seems to be working fine.....
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0