Zip an excel in a shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Zip an excel in a shell script
# 1  
Old 09-14-2010
Zip an excel in a shell script

I am getting an xls file in the dir errorpath. I would like to zip it. Kindly help me on this.

The code is as below.

Code:
 
sqllst=$errorpath/$run_pgm.${date_stamp}".xls"             sqlstatus=$errorpath/$run_pgm"."${date_stamp}".sqlstatus" sqlscript=$binpath"/im_rpt.sql"


Last edited by pludi; 09-14-2010 at 04:41 AM..
# 2  
Old 09-14-2010
You paste the code with wrong format.
Code:
sqllst=$errorpath/$run_pgm.${date_stamp}".xls"
sqlstatus=$errorpath/$run_pgm"."${date_stamp}".sqlstatus"
sqlscript=$binpath"/im_rpt.sql"

What's the relationship with zip ?
# 3  
Old 09-14-2010
In the above code i am getting an excel (xls) file in the error directory . I want to zip(Compress) that perticualr excel there. Kindly suggest how to go further.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Help with Zip and FTP Shell Script

I am trying to combine zip and ftp upload in one script but for some reason I can't get it to work. It zips properly but does not ftp, seems like it just ignores ftp. Any help would be greatly appreciated. Thanks! #!/bin/sh cd /home/user/test zip -r test.zip * FOLDER='/home/user/test'... (2 Replies)
Discussion started by: shimabuku
2 Replies

2. Shell Programming and Scripting

Shell script not able to zip the file using gzip

Hi all, I am calling Temp.sh and it is has simple line $gpath=`which gzip` $gpath $FilePath/My_temp.log if I run this script, logging to server then its works fine. But when I send this script over the SSH it does not work at it. gzip is command is not execute. I am using gzip 1.6... (2 Replies)
Discussion started by: girijajoshi
2 Replies

3. Windows & DOS: Issues & Discussions

How to split the excel file into 3 files randaonly and zip them?

Hi , I have one excel file in zipped format which contains data with size 157 MB. It's original size is 2.6 GB so to send to user I zipped the file. Now user is saying unable to open the file at once because of huge size and want to split the excel file into 3 files randaonly and zip them.... (1 Reply)
Discussion started by: Maddy123
1 Replies

4. Shell Programming and Scripting

Using Shell Script in place of Perl script to Unzip the zip files.

Hi Expert, We have some shell scripts which Internally uses Perl Script to Unzip the source zip files which comes to inbound directory. So now our requirement is to avoid the dependency on Perl Script and us Shell Script to unzip the files. I have the Perl script with me attached can some one... (3 Replies)
Discussion started by: naveen.dasu
3 Replies

5. Shell Programming and Scripting

Excel from shell script

Is it possible to generate excel sheet from a shell script and rename the worksheet..? Thanks for your answer (1 Reply)
Discussion started by: Anu_1
1 Replies

6. UNIX for Advanced & Expert Users

Zip an excel file and email using script.

Hi All, Currently i am using below script to attach excel and email from a Unix script. uuencode ASC.xls|mailx -m -s "ABCD_subject`TZ=CST+24 date +%d-%b-%y`" email@email.com Can anyone give me or help me in zipping excel and sending that email as the excel is very heavy. Thanks, (14 Replies)
Discussion started by: Nithin
14 Replies

7. UNIX for Dummies Questions & Answers

How to take input from excel for shell script.

i have both linux and windos installed on my pc . i want to take 1st column of excel as in input for my shell script .can anyone tell me how can i achive that. (1 Reply)
Discussion started by: nitin_aaa27
1 Replies

8. Shell Programming and Scripting

editing excel file through shell script

Hi, I am having a business file in excel having charts based on data already present on it. I would like to add new rows after the existing data and refesh the chart on it using shell script. For example-- In excel file in "sheet1", There is some data in first 10 rows ( from column A to F).... (0 Replies)
Discussion started by: sanjay1979
0 Replies

9. Shell Programming and Scripting

Export to Microsoft excel using shell script

I have requirement where i have to export the data extracted from a flat file to a microsoft excel sheet. If the awk returns multiple records then all these records should go in into different rows of same column in excel. Eg. say data returned by excel is A,B,C,D then these 4 records should go... (1 Reply)
Discussion started by: goutam_igate
1 Replies

10. Shell Programming and Scripting

How to get values from an excel in a shell script

Hi All, Am trying to write a shell script which will get values from an excel and do some calculations. Can any one pls help me out in the commands used to get the values from ms-excel. Thanks!!!:) (2 Replies)
Discussion started by: msri.1900
2 Replies
Login or Register to Ask a Question