07-19-2007
UNix Shell script help
Hi
Thanks for the repsonse . Your code looks at one line only for the Q/A pair but I need to look at two consecutive lines as below.(The file is a sorted file sorted on Tran Id)
AS per your suggestion I am giving few lines of my file:
991320070521330000000003|Q13251|A18741|234567890123456
671320070521330000000003|Q13251|A18741|456787654328977
671320070521330000000003|Q13260|A18765|4567890987654321234
471320070521330000000003|Q13260|A18765|2345678901234561
In the above the two lines with transaction ID 671320070521330000000003 should be written to a good file as they are having both pairs of Q/A and the other should be written to bad file with comments like below:
991320070521330000000003|Q13251|A18741|234567890123456 --> ONLY Driver's Licence is present Credit card number missing
471320070521330000000003|Q13260|A18765|2345678901234561 --> ONLY Credit card number is present Driver's Licence missing
Once again thanks for your help.
Regards
SRK
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell.
So scenario is that
- I need to have one shell script which is ran as a part of crontab
- in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies
2. AIX
Hi,
Please give me the detailed Differences between writing Unix Shell script and AIX Shell Scripts. Thanks in advance..... (0 Replies)
Discussion started by: haroonec
0 Replies
3. Shell Programming and Scripting
I want to create an automated script which is called by another maually executed script.
The condition is that the no one should be able to manually execute the automated script.
The automated script can be on the same machine or it can be on a remote machine.
Can any one suggest a check in the... (1 Reply)
Discussion started by: adi_bang76
1 Replies
4. Shell Programming and Scripting
Can anybody help me out in sending parameters from sql*plus script to unix shell script without using flat files..
Initially in a shell script i will call sql*plus and after getting some value from some tables, i want that variable value in unix shell script. How can i do this?
Please tell me... (2 Replies)
Discussion started by: Hara
2 Replies
5. Shell Programming and Scripting
Hi,
I need help urgently for following issue. Pls help me to resolve this issue.
I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql)
I given... (6 Replies)
Discussion started by: praka
6 Replies
6. Shell Programming and Scripting
Hi,
Is it possible to ftp a huge zip file from windows to unix server using unix shell scripting?
If so what command i need to use.
thanks in advance. (1 Reply)
Discussion started by: Shri123
1 Replies
7. Shell Programming and Scripting
Can anyone help me with a dos batch script to execute a shell script residing in an unix server. I am not able to use ssh.
Thanks in advance (2 Replies)
Discussion started by: Shri123
2 Replies
8. Shell Programming and Scripting
Please share the doc asap as very urgently required. (1 Reply)
Discussion started by: 24ajay
1 Replies
9. Shell Programming and Scripting
Hi team,
My requirement is to transfer pdf files from windows machine to unix server and then from that unix server we should sftp to another server.
I have completed the first part i.e From windows to using to unix server with the help of psftp.exe
code:
psftp user@host -pw password <... (1 Reply)
Discussion started by: bhupeshchavan
1 Replies
10. Shell Programming and Scripting
Hi all,
$ echo $SHELL
/bin/bash
Requirement - How to pass oracle sql script as argument to unix shell script?
$ ./output.sh users.sql
Below are the shell scripts and the oracle sql file in the same folder.
Shell Script
$ cat output.sh
#!/bin/bash
.... (7 Replies)
Discussion started by: a1_win
7 Replies
LEARN ABOUT REDHAT
loopctrl
LOOPCTRL(8) Linux System Administration LOOPCTRL(8)
NAME
loopctrl - configure isdnloop ISDN driver
SYNOPSIS
loopctrl [-d Driver-Id] action options ...
DESCRIPTION
loopctrl is used to setup the isdnloop ISDN driver.
OPTIONS
-d Driver-Id
selects the virtual S0 interface named by Driver-Id. Driver-Ids are defined during driver initialisation. See isdnloop(4) for a
description of the syntax to be used for modularised and monolithic driver versions. This option must be used to identify the vir-
tual S0 interface if more than one S0 interface is existent. If a single virtual S0 interface is used, it may be omitted. If using
more than one virtual card, support for the other cards is enabled with the add action of loopctrl. Ids may not start with digits or
small x, because these values are misinterpreted as numeric parameters by insmod. For loading the module, always the newest modu-
tils package should be used to avoid problems during load.
The following actions may be given to loopctrl.
add [id]
enables support for an additional virtual card in the driver. If id is missing, adds a card with an id given by the system. with id
given, adds a card with an Id given by the user. Ids are checked against conflicts, and if a conflict happens, replaced by the sys-
tem in the same manner as if no Id was supplied.
leased on|off
switches between normal (dialup) and leased-line mode. Leased-line mode is intended for usage with S64K-lines or - if both channels
are used - for S02. These lines do not have a D-channel. When leased-line mode is enabled, the driver simulates incoming calls using
special "phone-numbers" for calling and called address which are generated as follows:
Calling number:
LEASEDx
where x is the internal slot-number of the S0 interface. This number starts with 0 for the first S0 interface and is
incremented by one for every S0 interface configured using the add action.
Called number:
x
where x is equal to the channel number of the calling S0 interface starting with 1.
start protocol phone1 [phone2 phone3]
starts the driver with the given D-channel protocol. If protocol is 1tr6, only phone1 has to be given. It is meant to be the base
number of the virtual S0 interface to which the EAZ is appended. If protocol is dss1, phone1, phone2 and phone3 have to be given and
represent the three MSNs of the virtual S0 interface.
dump is available if the program is configured using the --enable-dump option only. The contents of internal driver variables is dumped
on stdout.
BUGS
This program and the isdnloop driver are ALPHA code. The main intention for this driver is for testing the link level and applications.
AUTHOR
(C) 1997 by Fritz Elfert <fritz@isdn4linux.de>
SEE ALSO
isdnctrl(8), isdnloop(4), isdninfo(4), isdnctrl(4), ttyI(4).
isdn4k-utils-3.1pre4 1999/09/06 LOOPCTRL(8)