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 DEBIAN
af_commit
af_transact(3) Attribute Filesystem (AtFS) af_transact(3)
NAME
af_transaction, af_commit, af_abort - a simple transaction mechanism for AtFS
SYNOPSIS
#include <atfs.h>
int af_transaction (void)
int af_commit (void)
int af_abort (void)
DESCRIPTION
These functions implement a simple transaction mechanism for AtFS. A transaction starts with calling af_transaction. All changes to exist-
ing ASOs performed hereafter have no immediate permanent effect. They rather get into effect, when the transaction is ended. Calling
af_commit ends the transactions and causes all changes to be saved to disk. af_abort aborts the transaction without saving the changes.
These will then be discarded.
Only modification of the state of existing source ASOs will be deferred. Creation or deletion of ASOs have immediate effect, regardless if
a transaction is in effect or not. Additionally, all operations on derived ASOs (all operations on the derived object cache) are not
affected by the transaction.
All archive files that are to be changed when the transaction is finished are locked until the end of the transaction. The lock prevents
all other applications to perform any modifications on the archive file. You should make sure, that ending a transaction should never be
dependent on the successful termination of another application (deadlock danger).
DIAGNOSTICS
Upon error, -1 is returned and af_errno is set to the corresponding error number.
BUGS
Changes to the contents of busy versions have immediate effect.
AtFS-1.71 Fri Jun 25 14:33:21 1993 af_transact(3)