I'm looking for a way to match a particular string in another string and if a match is found execute some command.
I found the case statement can be used like this;
case word in
)
command ;; ] ...
esac
If my string to find is say "foo" in the string $mystring... (1 Reply)
My requirement is to replace a a particular pattren in a script from A to B.
I am not sure if this can be done through sed command or through awk .
The file sv.inc is
window DialogBox AddConnection
tag "~ActiveApp/Add Connection - Provider Type?URL"
I would wnat the file to be... (10 Replies)
Hi,
I need to create a shell script through which i need to populate email addresses in email columns of database table in mysql. Let say if email contains yahoo, hotmail, gtalk than email addresses need to move in their respective columns.
# !/bin/sh
yim="example@yahoo.com"... (3 Replies)
Hi,
I am using following command to extract string from a file. String will be after last / (slash).
awk -F\ / '{print $NF}' $FILE
but while appending the output in file in script, it dosent work. File created but of zero size... can anyone please help
`awk -F\\\/ '{print $NF}' $FILE` >... (3 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write an automated shell program(s) that can create, monitor the log files and report the issues for matching... (0 Replies)
Hi friends.. I have many dirs in my working directory. Every dir have thousands of files (.jsp, .java, .xml..., etc). So I am working with an script to find every file recursively within those directories and subdirectories ending with .jsp or .java which contains inside of it, the the pattern... (3 Replies)
Hi all,
Is Perl included by default in Ubuntu? I'm trying to write a program using as few languages as possible, and since I'm using a few Perl one-liners to do non-greedy matching, it's considered another language, and this is a bad thing.
Basically, I'm using a Perl one-liner to grab XML... (3 Replies)
Can anyone help me with sed or awk to do a bulk replace of the below requirements.
"REC_ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (
START WITH +7486
INCREMENT BY +1
MINVALUE +7467
MAXVALUE... (6 Replies)
Hi,
I know how to replace a string with another in a file.
But, i wish to replace the below string pattern
EncryptedPassword="{gafgfa}]\asffafsf312a" i.e EncryptedPassword="<any random string>"
To
EncryptedPassword=""
i.e remove the random password to a empty string.
Can you... (3 Replies)
Discussion started by: mohtashims
3 Replies
LEARN ABOUT CENTOS
pom_xpath_replace
POM_XPATH_REPLACE(7) Java Packages Tools POM_XPATH_REPLACE(7)NAME
pom_xpath_replace - replace XML node from POM file with given XML code
SYNOPSIS
%pom_xpath_replace XPath XML-code [POM-location]
DESCRIPTION
This macro patches specified POM file removing all XML nodes described by the XPath expression and injecting given XML code in their place.
XPath is an expression describing a set of XML nodes to be removed from the POM file. It must be a properly formated XPath 1.0 expression,
as described in http://www.w3.org/TR/xpath/.
POM location can be either a full path to the POM file, or a path to the directory containing pom.xml. If POM location is not given then
pom.xml from current working directory is used.
BUGS
POM files use a specific namespace - http://maven.apache.org/POM/4.0.0. Currently this namespace needs to be explicitly specified in all
XPath POM macros by prefixing all node names with pom:.
AUTHOR
Written by Mikolaj Izdebski.
REPORTING BUGS
Bugs should be reported through Red Hat Bugzilla at http://bugzilla.redhat.com/.
SEE ALSO pom_add_dep(7), pom_add_parent(7), pom_add_plugin(7), pom_disable_module(7), pom_remove_dep(7), pom_remove_parent(7), pom_remove_plugin(7),
pom_set_parent(7), pom_xpath_inject(7), pom_xpath_remove(7), pom_xpath_set(7).
JAVAPACKAGES 06/10/2014 POM_XPATH_REPLACE(7)