![]() |
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 |
| 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 |
| bash - batch script for extracting one file from multiple tar files | kuliksco | Shell Programming and Scripting | 4 | 11-13-2007 02:34 AM |
| Extracting a string from one file and searching the same string in other files | mohancrr | Shell Programming and Scripting | 1 | 09-19-2007 03:17 AM |
| replacing a string in all files in a dir | chiru_h | Shell Programming and Scripting | 3 | 07-25-2006 04:40 PM |
| Is extracting specific files from a zip file possible? | HLee1981 | UNIX for Dummies Questions & Answers | 1 | 10-14-2005 11:06 PM |
| extracting .rar files | sskb | UNIX for Dummies Questions & Answers | 5 | 05-15-2002 09:20 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
replacing files in an EAR file after extracting
{Hello All,
Here is what I am trying to do: I have an archive file: AppName.ear Code:
jar -tvf AppName.ear 60459 Thu May 01 09:29:36 EDT 2008 /SharedResources/Application/App.dat 67542 Thu May 01 09:29:36 EDT 2008 JDBCConn/Application/App.dat 14488 Thu May 01 09:29:36 EDT 2008 config.xml Code:
EARFILE="AppName.ear" DIRNAME="$EARFILE" mv $EARFILE $EARFILE.tmp unzip $EARFILE.tmp $DIRNAME Code:
Output: # ls -lrt AppName.ear total 32 -rw-r--r-- 1 root other 14488 May 1 09:29 config.xml drwxr-xr-x 3 root other 512 May 21 14:25 SharedResources drwxr-xr-x 3 root other 512 May 21 14:25 JDBCConn I am able to get till getting the entries of the ear file, for i in `jar -tvf AppName.ear | awk {'print $8'}`; do echo $i; done but how do I look for the files/dirs starting with / and replace it with __ ? Thanks, Chiru |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|