help with Scripting - trying to search for string and extract next few characters
Hi
I am new to world on unix scripting so any assistance would be gratefully appreciated,
I am trying to write a script which reads through a file, reads in line by line, searches for a pattern, copies string after it and then to do a search and replace elsehwere in the line,
so the input file would readsomething like
and i would want to extract the value3 from each line i.e "delta" and "echo" and replace Value2 with NewValue:extractedvalue Value2
so after runing the script the file shows
Moderator's Comments:
Please use code tags when posting data and code samples, thank you!
Last edited by Franklin52; 01-13-2011 at 05:57 AM..
I want to extract a string from a line in a text file between two different characters:
for example:
:string"
I want to extract string. It has to be done in a one-liner. (11 Replies)
Hi, guys. I have one question:
I need to search for a string in a file, and then extract another string from the file and assign it to a variable.
For example:
the contents of the file (group) is below:
...
ftp:x:23:
mail:x:34
...
testing:x:2001
sales:x:2002
development:x:2003
...... (6 Replies)
Hi Friends,
I have a script which returns me the following values line by line
ora_smon_RCAT102
oracleKHP102B (DESC
oraclePROOIDDB92 (DES
oraclePMS (DESCRIP
oracleBRIO (LOCAL=N
oracleBRIO (LOCAL=N
oraclePRDB92 (DES
oracleBRIO (LOCAL=N
oracleBRIO (LOCAL=N
oraclePMS (DESCRIP... (4 Replies)
How would I accomplish this if I want to test to see if it
1) starts with a dash so something like "-R"
AND
2) starts with 1 character then either a "-" or "+" and then up to 3 characters such as "a+rx" (3 Replies)
Hi,
I have a unix file with contents as below
Line1: ABC MNN X$$QWERTY$$ JKL
Line2: HELLO $$HOW$$ ARE $$YOU$$ DOING
i want to extract the string between $$ and $$ ie i want the output as QWERTY
HOW YOU
i want those strings seperated by some character say |
desired output is... (7 Replies)
Need Assistance in shell programming... I have a huge file which has multiple stations and i wanted to search particular station and extract few lines from it and the rest is not needed
Bold letters are the stations . The whole file has multiple stations .
Below example i wanted to search... (4 Replies)
Hi Team
I have an huge xml where i need to search for a ceratin numbers. For example
2014-05-06 15:15:41,498 INFO WebContainer : 10 CommonServicesLogs - CleansingTriggerService.invokeCleansingService Entered PUBSUB NOTIFY MESSAGE () -
<?xml version="1.0" encoding="UTF-8"... (5 Replies)
Hi,
I have a log file which is the output from a xml script :
<?xml version="1.0" ?>
<!DOCTYPE svc_result SYSTEM "MLP_SVC_RESULT_320.DTD">
<svc_result ver="3.2.0">
<slia ver="3.0.0">
<pos>
<msid type="MSISDN" enc="ASC">8093078040</msid>
<poserr>
... (4 Replies)
Hi All,
I am trying to extract only characters from a string value eg: abcdedg1234.cnf
How can I extract only characters abcdedg and assign to a variable.
Please help.
Thanks (2 Replies)
Discussion started by: abhi_123
2 Replies
LEARN ABOUT HPUX
rmdel
rmdel(1) General Commands Manual rmdel(1)NAME
rmdel - remove a delta from an SCCS file
SYNOPSIS
SID file ...
DESCRIPTION
The command removes the delta specified by the SID from each named SCCS file. The delta to be removed must be the newest (most recent)
delta in its branch in the delta chain of each named SCCS file. In addition, the SID specified must be that of a version being edited for
the purpose of making a delta (i.e., if a p-file (see get(1)) exists for the named SCCS file, the SID specified must appear in any entry of
the p-file).
If a directory is named, behaves as though each file in the directory were specified as a named file, except that non-SCCS files (last com-
ponent of the path name does not begin with and unreadable files are silently ignored. If a name of is given, the standard input is read;
each line of the standard input is taken to be the name of an SCCS file or directory to be processed; non-SCCS files and unreadable files
are silently ignored. When is specified on the command line, all following arguments are treated as file names.
The permissions to remove a delta are either (1) if you make a delta you can remove it; or (2) if you own the file and directory you can
remove a delta.
EXTERNAL INFLUENCES
Environment Variables
determines the locale for the interpretation of text as single-byte and/or multi-byte characters.
determines the language in which messages are displayed.
also determines the local language equivalent of the affirmative string ("yes").
If or is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty
variable. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of
If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See
environ(5).
International Code Set Support
Single-byte and multi-byte character code sets are supported.
DIAGNOSTICS
Use sccshelp(1) for explanations.
FILES
See delta(1).
See delta(1).
SEE ALSO delta(1), get(1), sccshelp(1), prs(1), sccsfile(4).
STANDARDS CONFORMANCE rmdel(1)