07-02-2007
Hi
I am using the awk Script developed by Jean-Pierre
I need a small modification in the Script.....
This time i am searching form the Call to the Particular Program with USING + Agruments...
Let me be clear
Input is
PERFORM AAAA-CALL-PROGRAM.
AAAA-CALL-PROGRAM.
CALL 'PROGRAM' USING CCCCC
DDDDD.
In Input i search for CALL 'PROGRAM' and See How many Arguments are Passed to it...
IN this case it 2..
I tried Modifying the Script as follows
/.*[ ]*CALL.*'\''PROGRAM/,/\./ {
count = NF;
if (/.*[ ]*CALL.*'\''PROGRAM/) # If CALL PROGRAM
count -= 2; # CALL and PROGRAM aren't arguments
if (/USING/) {
proceed_args=1;
--count;
But this Gives me
temp #Args=0 even if i have two args CCCCC and DDDDD..
Is Suppose some Problem in my Pattern matching.. I used '\'' to search for '(Single Quote)
I wanted to match if the Called Program and the Calling Program use the Same Number of Arguments... for that I was trying this script..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i wanted to search between pattrens
so i used
awk /"EXEC CICS DELETEQ TS"/,/END-IF/
but the some change is
AAAAAAAA
EXEC CICS DELETEQ TS
IF .....
END-IF....
XXXXXx
XXX
IF (3 Replies)
Discussion started by: pbsrinivas
3 Replies
2. Shell Programming and Scripting
Hi Every One...
I wanted to inserted a line in between matched pattrens..
Ex...
InPut File..
WRITEQ
TS
**************************
aaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbb
cccccccccccccccccccccccc
SOME PATTREN's
RESP ( WS-RESP )
... (7 Replies)
Discussion started by: pbsrinivas
7 Replies
3. Shell Programming and Scripting
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies
4. 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
5. Shell Programming and Scripting
Hi All,
Can you please guide me to search a string in a particular column of file and return the line number of the line where it was found using awk. As an example :
abc.txt
7000,john,2,1,0,1,6
7001,elen,2,2,0,1,7
7002,sami,2,3,0,1,6
7003,mike,1,4,0,2,1
8001,nike,1,5,0,1,8... (3 Replies)
Discussion started by: arunshankar.c
3 Replies
6. Shell Programming and Scripting
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies
7. 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
8. 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
9. Shell Programming and Scripting
Hi,
Need your help for this scripting issue I have. I am not really good at this, so seeking your help.
I have a file looking similar to this:
Hello, i am human and name=ABCD.
How are you?
Hello, i am human and name=PQRS.
I am good.
Hello, i am human and name=ABCD.
Good bye.
Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies
10. UNIX for Dummies Questions & Answers
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
LEARN ABOUT DEBIAN
kvkcard
KVKCARD(1) KVKCARD(1)
NAME
kvkcard - a commandline tool to read information from a German medical card
SYNOPSIS
kvkcard read | daemon | rdvd | rdpd [ [ -v | --verbous ] [ -fFILE | --filename=FILE ] [ -cCARDID | --cardid=CARDID ] [ -b | --beep ] [ -d |
--dosmode ] [ -pPROGRAM | --program=PROGRAM ] [ -aARGUMENTS | --args=ARGUMENTS ] [ -h | --help ] ]
DESCRIPTION
kvkcard is a commandline tool to read information from a German medical card (KVK or eGK).
ARGUMENTS
read Read data from a German medical card.
daemon Wait for insertion of a German medical card and run a program on it.
rdvd Dump RDVD data structure of a card.
rdpd Dump RDPD data structure of a card.
-v | --verbous
Every occurrence of this option increases the verbosity.
-f FILE | --filename=FILE
File to write to. If omitted stdout will be used.
-c CARDID | --cardid=CARDID
Set the ID of the card to read.
-b | --beep
Beep after reading a card.
-d | --dosmode
Output data in DOS mode.
-p PROGRAM | --program=PROGRAM
Program to call on cards found.
-a ARGUMENTS | --args=ARGUMENTS
Arguments for the program to be called
-h | --help
Shows this help.
FILES
/etc/chipcard/
The system-wide configuration files.
/var/log/chipcard/
The default log files.
SEE ALSO
http://www.libchipcard.de
Homepage of libchipcard project.
/usr/share/doc/libchipcard-tools/
Local documentation.
REVISION
Manual for kvkcard 2009 March 19th KVKCARD(1)