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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 02-04-2008
varungupta varungupta is offline
Registered User
  
 

Join Date: Feb 2007
Location: Pune, Dehradun (INDIA), Michigan(US)
Posts: 206
Quote:
Originally Posted by envisage View Post
Hi,

I am having a Excel sheets with 4 columns and 50 rows.
I need a script which check Date columns in excel sheet and then replace few cells with the random number (based on a date check operator).

I then need the excel sheet back to my window system, where is Linux is the remote system.

Thanks
hey,

$ cat /tmp/file.txt
NAME ID YEAR
abc 25 1995
ced 34 1977
ttt 43 1983

Create a csv file,which can be opened up in XL,

awk '{print $1","$2","$3}' < /tmp/file.txt > /tmp/file.csv

cat /tmp/file.csv
NAME,ID,YEAR
abc,25,1995
ced,34,1977
ttt,43,1983


Thanks.