I have inherited some code that I need to understand.
Ine of the conditions says:
if [ condition ]
then
..something..
elfif [condition -a condition ]
then
... something else ...
...
Store the fields of one record for all records of a variable length ascii file in variables in a Korn Shell script.
For example, the format of the file is:
field1, field2, field3, .. .field...
I want to loop thru all the sub directories within a directory using shell script. Please advise.
Hi,
I am looking for a way to loop through each file in a given directory using ksh.In a particular directory I need to check every file with .csv extension. If .csv file exists I need to pro...
Hi
Im trying to search a text file for a certain string then grab text around it and create a new text file withy the copied text.
I attached the text file...also:
---------------------...
SHELL SCRIPT
We have to create a shell script with an Oracle INSERT command to insert rows into Table B from Table A every night with the following two conditions:
1. where users NOT IN ...
I am trying to run a C executable from within a Korn Shell Unix script. The C executable is to create a csv file and returns 0, 1, or -1 depending on success, warning, or failure. I am able ...
Hi
A couple of text files have been found to have been ftp'ed into
the Unix servers in binary mode & this resulted in jobs/scripts/files
can't be read.
I once had a bad case of the dev...
I've a script type the following :
exec 4< `cmviewcl -l package|grep up|awk '{print $1}'`
while read -u4 lineA
do
echo $lineA
done
Output
hp1-ossprod : /# ksh /tmp/reset_count_ag...
I have a script that searches a large file, and does arithmetic depending on what it finds.
Its a bit script but the bit of interest is:
for FILE in `ls $FILEMASK`
do
while read line...
I am new to shell scripting and I am using ksh. I have a shell script to run a list of sql scripts. Below is a sample of how I run the scripts. Now suppose I want to run from the middle of ...
# client id: 298
298 local:/opt/intrd298.psv: norm /opt/hold OURTXNS nocr schema@schema
298 local:/opt/incpn298.psv: norm /opt/hold OURTXNS nocr schema@schema
298 local:/opt/inbtb298.psv:...
Hi
I have a unix file and want to replace some positions in each line based on the characters at different position.
example of the file:
ACI CCCC ALSJWKAS ABCD XXX102YY 1234
ACI ...
I have a Unix Korn shell script that compares the new file with a previous file to create an output file of only the new records. There is an overlap of some of the old records between the pr...
How do I grep for the exact string in a shell script? I have the input customer name to the script. I want to grep for the exact string
I tried grep $customer. But looks for all the words t...
I am doing ls -lt and this command sometime lists the year of modification but sometime just lists, Month, Day and the time. I need the Month, Day and the Year of the last modification.
ls ...
I have about 20 different files all with Oct01, such as claims_line_source.dat_Oct01.
So I just want to strip out Oct01 out of every file name.
Is there an easy way to do this?
I'm looking for a robust way of scripting the following,
either in perl or unix shell script, for AIX
I have two files that get produced each day one will have the first line starting with...
Hai !
I have 3 jobs
ex: P1, P2 , P3 all running in back ground.
Next part of the script is dependent on the completion of the above 3 parallel back ground jobs.
script str...