|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
batch shell script to zip individual files in directory - help
help trying to figure out a batch shell script to zip each file in a directory into its own zip file
using this code but it does not work Quote:
Quote:
i have over 3000 files i need to zip up individualy files to be zipped are in this format 123.flv.3gp hopfully ending up like 123.flv.3gp.zip is the file structure the problem running a single zip command from shell seems to work ok thanks for help in advance |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
The first script looks excellent, if you run it like 3gptozip *.3gp
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
sorry to be a bit stupid but how or what do i change and where to make this work am i not doing the zip -j "$f.zip" "$f" part right or is there a problem, in the echo commands i was tying to run it with nohup ./3gptozip.sh & and ./3gptozip.sh but is that the problem thanks, i'm new to shell scripting by the way |
|
#4
|
|||
|
|||
|
The problem is that you need to list the files you want to zip on the command line, the script doesn't contain this information. "$@" contains the arguments passed to the script on the command line.
|
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
how whould i do that in shell ??
is it something like nohup ./3gptozip.sh *.3gp & or ./3gptozip.sh *.3gp or is that the incorrect way to do it, thanks for help by the way |
| Sponsored Links | |
|
|
#6
|
|||
|
|||
|
thanks works ok now
|
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
zip individual files
how to zip individual files (.txt) into its own zip file.
is it something like directory name 'test' for file in test/* do zip $file.zip $file.txt? it's not working. please help. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Executing a batch of files within a shell script with option to refire the individual files in batch | goddevil | Shell Programming and Scripting | 2 | 01-09-2012 02:51 PM |
| HOW: Shell script accessing files located in individual logged in user. | shekharjchandra | Shell Programming and Scripting | 1 | 05-02-2011 10:49 AM |
| Apply 'awk' to all files in a directory or individual files from a command line | ScKaSx | Shell Programming and Scripting | 4 | 11-04-2010 06:50 PM |
| Help with shell script to batch process files in a directory | Cannoli | Shell Programming and Scripting | 3 | 11-01-2009 12:57 PM |
| Converting Shell script to Dos batch files | darwinkna | Shell Programming and Scripting | 1 | 05-12-2006 11:01 AM |
|
|