![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| thousands separator | ynixon | Shell Programming and Scripting | 11 | 04-13-2008 11:43 AM |
| Multiple (thousands) of Cron Instances | sysera | UNIX for Advanced & Expert Users | 10 | 01-17-2006 09:49 AM |
| How do I send a file as an attachment (gzip file) on a Unix system | lacca | UNIX for Dummies Questions & Answers | 3 | 07-03-2002 02:04 PM |
| gzip in shell script called by cron | hbau419 | Shell Programming and Scripting | 2 | 02-05-2002 07:03 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
script for Gzip thousands of file
Hi experts,
I have thousands of file (data file and Gziped file) in same directory like below-- bash-2.05$ pwd /home/mmc bash-2.05$ file PP023149200709270546 TT023149200709270546: gzip compressed data - deflate method bash-2.05$ file PP027443200711242320 TT027443200711242320: data i have script which i used before to UNZIP the Gzip files and send it to another directory Among those files Gzip & data files. Code:
#!/usr/bin/sh cd /home/mmc/ for i in `ls PP02*` do l=`file $i|grep gzip|wc -l` if [ $l -ne 0 ]; then gunzip -c $i > /home/mmc/zip/$i fi done Please help me to write the script. |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|