03-21-2010
Thanks for the solutions. I prefer the awk since I am not restricted to get the JobID only. I may also need to get values of other parameters. However, I am having problem when I have another parameter with the text 'JobID' in it such as:
Param1="JobID=1234"
Param2="Company=ABC"
Param3="Address=Sunnyvale,CA"
Param4="OldJobID=5678"
Can you tweak the awk a little please? Thanks in advance.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file with the following contents
# Lines that start with a # are comments.
#
# Calling TOAD like this will perform a comparison from command line :
#
# "C:\Program Files\Quest Software\Toad for Oracle 9.6\toad.exe" -c... (2 Replies)
Discussion started by: rajan_san
2 Replies
2. Shell Programming and Scripting
Hi ,
I have input file and i want to extract below strings
<msisdn xmlns="">0492001956</ msisdn> => numaber inside brackets
<resCode>3000</resCode> => 3000 needs to be extracted
<resMessage>Request time
getBalances_PSM.c(37): d out</resMessage></ns2:getBalancesResponse> => the word... (14 Replies)
Discussion started by: sushmab82
14 Replies
3. Shell Programming and Scripting
Hi Guys,
I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same.
can anyone of you please let me know how to go about it ? (8 Replies)
Discussion started by: sukrish
8 Replies
4. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Discussion started by: tuathan
5 Replies
5. 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
6. Shell Programming and Scripting
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies
7. Shell Programming and Scripting
Dear All
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies
8. UNIX for Beginners Questions & Answers
I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file.
Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies
9. Shell Programming and Scripting
What I need is to remove the text from Location_file.txt from each line matching all entries from Remove_location.txt
Location_file.txt
FlowPrePaid, h3nmg1cm2,Jamaica_MTAImageFileFlowPrePaid,h0nmg1cm1, Flow_BeatTest,FlowRockTest
FlowNewTest,FlowNewTest,h0nmg1cm1
PartiallySubscribed,... (3 Replies)
Discussion started by: ketanraut
3 Replies
10. Shell Programming and Scripting
I have a file comp.pkglist which mention package version and release . In 'version change' and 'release change' line there are two versions 'old' and 'new' Version Change: --> Release Change: -->
cat comp.pkglist
Package list: nss-util-devel-3.28.4-1.el6_9.x86_64
Version Change: 3.28.4 -->... (1 Reply)
Discussion started by: Paras Pandey
1 Replies
LEARN ABOUT DEBIAN
templates2ada
TEMPLATES2ADA(1) Templates Parser User's Guide TEMPLATES2ADA(1)
NAME
templates2ada - generate Ada sources from a templates file
SYNOPSIS
templates2ada [options]
DESCRIPTION
templates2ada parses all the template files in a directory and then generates an output file from these, based on a template file (a
default example of which is provided as /usr/share/doc/libtemplates-parser-dev/examples/templates.tads). The latter contains in fact two
examples, depending on whether one Ada package should be generated per template, or whether a single package should be built. In the for-
mer case, if you are using the GNAT compiler, you should run `gnatchop' on the resulting file. Here is an example:
$ rm -f src/templates/*.ads
$ templates2ada -d resources/ -o src/templates/generated -r
$ cd src/templates; gnatchop -w -q generated
$ rm -f src/templates/generated
One of the goals of templates2ada is to ensure that you are only setting tags that actually exist in the template (and thus prevent, as
much as possibly, typos in the name of tags); also, when combined with other tools, to help ensure that all tags needed by the template are
properly set.
templates2ada also has special knowledge about HTTP constructs and will generate Ada constants for the HTTP parameters you might receive in
return. Once more the goal is to help avoid typos in the Ada code.
For instance, we will consider a simple template file, found in a local file `resources/block1.thtml'. This template contains the following
simple html code:
<form>
<input name="PARAM1" value="@_TAG1_@" />
<input name="PARAM2" value="@_TAG2_@" />
</form>
When you run templates2ada, the following Ada package will be generated. Note that this is only the default output of templates2ada, which
can be fully tailored to your needs.
package Templates.Block1 is
pragma Style_Checks (Off);
Template : constant string := "resources/block1.thtml";
Tag1 : constant String := "TAG1";
Tag2 : constant String := "TAG2";
package Http is
Param1 : constant String := "PARAM1";
Param2 : constant String := "PARAM2";
end Http;
end Templates.Block1;
OPTIONS
-d dir Search for template files in dir.
-h Display a summary of options.
-o file
Write the output to file.
-e ext Process all files with extension ext that are in the input directory; consider these files as template files.
-r Recurse into subdirectories.
-t file
Use file as the output template file. The templates parser comes with an example for such a file, /usr/share/doc/templates-
parser/examples/templates.tads, that you can adapt to your own needs.
-v Verbose mode. This will output a warning when an http parameter has a name made only of template parser tags, since no matching
entry can then be created for it in the output file.
SEE ALSO
templatespp(1)
The Template Parsers User's Guide in package libtemplates-parser-dev.
AUTHOR
templates2ada was written by Pascal Obry <p.obry@wanadoo.fr> as part of the Ada Web Server.
This manual page was written by Ludovic Brenta <lbrenta@debian.org> for Debian GNU/Linux.
GNU Ada Tools 2008-05-04 TEMPLATES2ADA(1)