![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | 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. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Create A Simple GUI For Shell Script | Grizzly | Shell Programming and Scripting | 1 | 09-18-2009 11:28 AM |
| Shell script to create a link | Shreedhar Naik | Shell Programming and Scripting | 3 | 05-22-2008 08:01 AM |
| shell script to create dirs | sjajimi | Shell Programming and Scripting | 2 | 07-24-2007 08:34 AM |
| create a shell script | maykap100 | Shell Programming and Scripting | 3 | 08-31-2005 11:17 PM |
| Shell script to create a DOS-like Menutiem | bionicfysh | Shell Programming and Scripting | 2 | 06-17-2002 05:03 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Create Jar using shell script
Hi Folks
I came up with peculiar requierement .. ![]() I have to jar special files types only from a number of child folders , and also exactly same as the child file path...sorry i will give an example suppose i have following folder structure # cd HTML/ total 0 drwxrwxr-x 2 johycage johycage 96 Sep 23 07:42 HTML drwxrwxr-x 2 johycage johycage 96 Sep 23 07:42 XML -rw-rw-r-- 1 johycage johycage 0 Sep 23 07:42 1.html -rw-rw-r-- 1 johycage johycage 0 Sep 23 07:42 2.html #cd HTML/ total 0 -rw-rw-r-- 1 johycage johycage 0 Sep 23 07:42 1.html -rw-rw-r-- 1 johycage johycage 0 Sep 23 07:42 2.html # cd ../XML/ total 0 -rw-rw-r-- 1 johycage johycage 0 Sep 23 07:42 1.xml -rw-rw-r-- 1 johycage johycage 0 Sep 23 07:42 2.xml And all i want is to create jar file which contain onlt html file types in the following manner. # jar -tvf test.jar 0 Wed Sep 23 07:42:22 MST 2009 home/johycage/HTML/HTML/1.html 0 Wed Sep 23 07:42:28 MST 2009 home/johycage/HTML/HTML/2.html 0 Wed Sep 23 07:42:50 MST 2009 home/johycage/HTML/1.html 0 Wed Sep 23 07:42:56 MST 2009 home/johycage/HTML/2.html I have achieved this using below simple scriipt. But as you know adding files using jar -uvf take much time if folder strcture is more complex. I am attaching the script below which used, Anyone have a better idea ??? touch test.jar find /home/johnycage/HTML/ -name '*.html' -print| while read obj do jar -uvf test.jar $obj done cheers ![]() |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|