Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix MIKS toolkit for Windows

Status
Not open for further replies.

uguess

Technical User
Nov 5, 2004
40
CA
Hi Folks

I have MKS toolkit which allows you to run unix on windows platform. However i found that unix don't exactly work as it is suppose to under pure unix platform.

Here is what i want to accomplish.

Drive G: (drive G which has following folders in it)
set_aa
set_ab
set_ac

Drive H (drive H which has following folders in it)
set_ad
set_ae


I want to zip the folders located in G & H drive as per my setting in config file.

Config_file:
G:\set_aa
H:\set_ae

Shell script
for file in `cat config_file`
do
wzzip -a -r -P newfile $1
done


I am trying to zip folders as per my config file thru script, one after the other. However it is not working. Secondly sometimes my path name could have spaces example
c:\Document and folder\Desktop\

unix dont seem to recognize the spaces.

Can some one help.

Thanks
 
In your Shell script where is $1 coming from and why is $file not used ?
For pathname with embedded space, symply use the shell quoting mechanism:
mydir="c:/Document and folder/Desktop/"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
a slightly better version would be:
Code:
while IFS= read file
do
  wzzip -a -r -P newfile "${file}"
done < config_file

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top