08-16-2011
Grep a string and write a value to next line of found string
Hi,
I have two variables x and y.
i need to find a particular string in a file, a workflow name and then insert the values of x and y into the next lines of the workflow name.
basically it is like as below
wf_xxxxxx
$$a=
$$b=
$$c= figo
$$d=bentley
i need to grep the 'wf_xxxx' and then write the values x and y to$$a and $$b.
Thanks in advance.
Last edited by angel12345; 08-16-2011 at 10:22 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all
Im performing find + grep operation that looks like this :
find . -name "*.dsp" | xargs grep -on Project.lib | grep -v ':0'
and I like to add to this one liner the possibility to replace the string " Project.lib" that found ( more then once in file ) with "Example.lib"
how can I do... (0 Replies)
Discussion started by: umen
0 Replies
2. Shell Programming and Scripting
I've seen several examples of grep showing the filename the string was found in, but what I really need is grep to show the file details in long format (like ls -l would).
scenario is:
grep mobile_number todays_files
This will show me the string I'm after & which files they turn up in, but... (2 Replies)
Discussion started by: woodstock
2 Replies
3. Shell Programming and Scripting
I know how to grep, copy and paste a string from a line. Now, what i want to do is to find a string and print a string from the line below it. To demonstrate:
Name 1: ABC Age: 3
Sex: Male
Name 2: DEF Age: 4
Sex: Male
Output:
3 Male
I know how to get "3". My biggest problem is to... (4 Replies)
Discussion started by: kingpeejay
4 Replies
4. Shell Programming and Scripting
Hello Everyone,
I just started scripting this week. I have no background in programming or scripting.
I'm working on a script to grep for a variable in a log file
Heres what the log file looks like. The x's are all random clutter
xxxxxxxxxxxxxxxxxxxxx START: xxxxxxxxxxxx... (7 Replies)
Discussion started by: rxc23816
7 Replies
5. Shell Programming and Scripting
Hi,
1_strings file contains
$ cat 1_strings
/home/$USER/Src
/home/Valid
/home/Review$ cat myxml
<projected value="some string" path="/home/$USER/Src">
<input 1/>
<estimate value/>
<somestring/>
</projected>
<few more lines >
<projected value="some string" path="/home/$USER/check">... (4 Replies)
Discussion started by: greet_sed
4 Replies
6. UNIX for Dummies Questions & Answers
Right now, my code is:
s/Secondary Ins./Secondary Ins.\
1/g
It's adding a 1 as soon as it finds Secondary Ins.
Primary Ins.: MEDICARE B DMERC Secondary Ins.
1: CONTINENTAL LIFE INS
What I really want to achieve is having a 1 added on the next line that contain "Secondary Ins." It... (4 Replies)
Discussion started by: newbeee
4 Replies
7. Shell Programming and Scripting
I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck. Thanks for your help in advance :wall:. (4 Replies)
Discussion started by: JC_1
4 Replies
8. Shell Programming and Scripting
Hi,
I need to find all rows in 1st col of one file in another file (first occurrence) and replace the 1st col of first file with the grep result (the entire line). For example search AA from file 1 in file 2 and replace in file 1 by entire line found.
File1
AA BB CC DD
BB AA CC DDFile2
... (2 Replies)
Discussion started by: ritakadm
2 Replies
9. Shell Programming and Scripting
Hi All
I'm trying to insert a new line at the before each comment line in a file.
Comment lines start with '#-----'
there are other comments with in lines but I don't want a new line there.
Example file:
blah
blah #do not insert here
#this is a comment
blah #some more
#another comment... (10 Replies)
Discussion started by: Mudshark
10 Replies
10. Shell Programming and Scripting
Hello,
Could you please help me how to search the string in a file, and when found; change the existing line to uppercase in command line?
I tried:
?whichcommand? -A "EXT" fileA | awk '{print tolower($0)}' | tee fileB
tr command simply converts entire file to uppercase but this is not what... (4 Replies)
Discussion started by: baris35
4 Replies
LEARN ABOUT DEBIAN
pegasus-remove
PEGASUS-REMOVE(1) PEGASUS-REMOVE(1)
NAME
pegasus-remove - removes a workflow that has been planned and submitted using pegasus-plan and pegasus-run
SYNOPSIS
pegasus-remove [-d dagid] [-v] [rundir]
DESCRIPTION
The pegasus-remove command remove a submitted/running workflow that has been planned and submitted using pegasus-plan and pegasus-run. The
command can be invoked either in the planned directory with no options and arguments or just the full path to the run directory.
OPTIONS
By default pegasus-remove does not require any options or arguments if invoked from within the planned workflow directory. If running the
command outside the workflow directory then a full path to the workflow directory needs to be specified or the dagid of the workflow to be
removed.
pegasus-remove takes the following options:
-d dagid, --dagid dagid
The workflow dagid to remove
-v, --verbose
Raises debug level. Each invocation increase the level by 1.
rundir
Is the full qualified path to the base directory containing the planned workflow DAG and submit files. This is optional if
pegasus-remove command is invoked from within the run directory.
RETURN VALUE
If the workflow is removed successfully pegasus-remove returns with an exit code of 0. However, in case of error, a non-zero exit code
indicates problems. An error message clearly marks the cause.
FILES
The following files are opened:
braindump
This file is located in the rundir. pegasus-remove uses this file to find out paths to several other files.
ENVIRONMENT VARIABLES
PATH
The path variable is used to locate binary for condor_rm.
SEE ALSO
pegasus-plan(1), pegasus-run(1)
AUTHORS
Gaurang Mehta <gmehta at isi dot edu>
Jens-S. Vockler <voeckler at isi dot edu>
Pegasus Team http://pegasus.isi.edu
05/24/2012 PEGASUS-REMOVE(1)