05-22-2009
I guess the text that come out from jar -tvf looks like these.
<abc.class> , <xyz$abc.class>
if so why don't you try this:
jar -tvf old_jarfiles/$jarname | grep "^<$fntoreplace"
If I do a wrong guess. There is the way to put "\" in front of "$" before the text feed through the grep command as:
jar -tvf old_jarfiles/$jarname | sed 's/\$/\\$/' | grep "\<$fntoreplace\>"
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'd like to make a script that I can execute every time I sign on to my linux box that keeps track of the time and allows to me to add a remark to a file. So basically once I log in, I run the script, and it outputs the date and time to a text file (log.txt). But that isn't my problem.
I need... (1 Reply)
Discussion started by: Glider
1 Replies
2. UNIX for Dummies Questions & Answers
why a minus sign is put for options in unix commands
suggestions plz (2 Replies)
Discussion started by: trichyselva
2 Replies
3. Shell Programming and Scripting
Hi I have find some account numbers from .gz files.
There thousands of .gz files, also i am unable to grep .gz / .z files.
I want to find file names & and those lines from list.
Could you pls tell me / give me any syntax for finding word from ,gz files using grep?
Thanks in advance (8 Replies)
Discussion started by: udaya_subbu
8 Replies
4. UNIX for Dummies Questions & Answers
I am using Mac OS X version 10.5.7, and had a problem accessing a folder on our shared area network. I logged in via terminal (bash shell), and did a ls -l on the main directory, and the directory that isn't showing up has an @ sign at the end:
rwxr-xr-x@ 19 admin staff 2048 Jun 1 07:53... (1 Reply)
Discussion started by: aaronstella
1 Replies
5. Shell Programming and Scripting
Hi All, I need to grep few files which has words like the below in the file name , which i want to put it in a file and and grep for the files which contain these names and move it to a new directory ,
full file name -C20091210.1000-20091210.1100_SMGBSC3:1000... (2 Replies)
Discussion started by: anita07
2 Replies
6. Shell Programming and Scripting
hi so I was debugging some scripts and I ran into a problem that did not come up before
grep -n "$variable"$ ./file.txt
I figured the second $ is meant to reference the end of the line but this gave me trouble in my c shell. anyone know whats wrong here or how to rewrite this???
Thank... (2 Replies)
Discussion started by: vas28r13
2 Replies
7. Forum Support Area for Unregistered Users & Account Problems
I am unable to sign in to the UNIX forum. I tried my username "timotei2" and the password - but access was denied. My email address - <removed> - was not recognised, either. This is strange as I registered some years back. Should I re-register, or can nyou re-set my log in credentials? (1 Reply)
Discussion started by: Unregistered
1 Replies
8. Forum Support Area for Unregistered Users & Account Problems
I tried logging in under my username (Michael Mullig) but as it's been a while I've forgotten my password. None of my email addresses are recognized either. Thinking that my username my have been purged due to lack of activity (understandable) I tried to re-register, only to find the name is still... (2 Replies)
Discussion started by: Mike Mullig
2 Replies
9. Shell Programming and Scripting
Hi
I Have a directory and i have some files below
abc.txt
abc.gif
gtee.txt
ghod.pid
umni.log
unmi.tar
How can use glob function to grep abc files , i have created a variable "text" and i assigned value as "abc", please suggest me how can we use glob.glob( ) to get the output as below... (2 Replies)
Discussion started by: kumar85shiv
2 Replies
10. Shell Programming and Scripting
I have a script which is reading value from property file and doing replacement in source location which contains multiple files.
property file has values
abc=xyz; yux=1;version=3.0;
bcd=123;apple==mango
when my script does search and reads value from property file.
its replacing value... (1 Reply)
Discussion started by: Shamkamde
1 Replies
LEARN ABOUT CENTOS
build-jar-repository
BUILD-JAR-REPOSITO(1) Java Packages Tools BUILD-JAR-REPOSITO(1)
NAME
build-jar-repository - create a symbolic link to a JAR
SYNOPSIS
build-jar-repository [OPTION]... DIRECTORY JAR|artifact-coordinates
DESCRIPTION
Build a JAR repository in the named directory by copying files or creating symbolic links. The JARs can be identified by their names or
Maven artifact coordinates. Artifact coordinates specify Maven artifact and are in format
groupId:artifactId[:extension[:classifier]]:version. If extension is omitted then "jar" is used. If classifier is omitted then empty
classifier is used. For more information see XMvn Configuration Reference.
OPTIONS
If no option is specified the default action will be to create symbolic links
-c, --copy
Copy files.
-h, --hard
Create hard links.
-p, --preserve-naming Try to preserve the names of the original JAR files (in case of a nested hit the slashes in the path will still be
replaced by underscores). Using this option makes any future automated repository rebuild impossible, and implies -c unless specified
otherwise.
-s, --soft, --symbolic Create symbolic links (default).
--help Display help text
EXAMPLES
build-jar-repository . jndi - This will create a symbolic link to the jndi JAR in the current working directory.
build-jar-repository -h /tmp log4j - This will create a hard link to the log4j JAR in /tmp directory.
build-jar-repository -c . org.apache.commons:commons-io - This will copy commons-io JAR to the current working directory.
AUTHOR
Originally written by Nicholas Mailhot and David Walluck.
REPORTING BUGS
Bugs should be reported through Red Hat Bugzilla at http://bugzilla.redhat.com/.
SEE ALSO
build-classpath(1), rebuild-jar-repository(1),
JAVAPACKAGES
06/10/2014 BUILD-JAR-REPOSITO(1)