OK. I need help in unix scripting.
I have attached a sample file. Here are my queries.
1. Read the text file line by line. So there should be 5 lines to be read
2. Find t.mgmt_sa_code=...
Hi ppl,
I have this one line in my shell script that looks like this:
x=`date +"%H"` ; echo $x ; while [ $x -lt 12 ] ; do ; x=`date +"%H"` ; done
It makes sense to me but when I run i...
Hi,
I'm using a script to start my application on a daily basis. A cron-like application called Control-M calls this script at a give time and starts the app. The script istelf is very simp...
How do I pattern match DL_XXX in a shell script. I want to ignore directories starting with DL
can I do somethign like
$dirName != "DL%"
I'm looking for a script that uses vmstat from cron on like a minute interval to capture processes that utilize 95%+ cpu load. I then need the minute outputs processed so that if any process i...
Hi,
i have created a shell script (.ksh) the runs three queries(plsql). These three queries create three csv files which are saved in a directory called results. I need a way to check if thes...
Hi all,
My environment DB2 UDBv8 going on to v9, Linux OS. What I am looking for is a way to read a flat file created by a script and remove duplicate records. The idea is to read the file an...
Hai !
This is my question.
i have a file something like my_file_20080810.dat
now i need to look for the file in a folder and then grab the timestamp.
cd directory_in_which_f...
I have a shell script with the following content.
ssh br@qsapp05 "for f in "/opt/HistLoad.*.psv";do mv $f ${f#HistLoad.};done"
But gives an error mv : can't access the HistLoad.1000.psv
Hi,
I have a requirement to split the file on different pattern and write to different files.
My scripts doing the work properly but i am facing a strange problem. while writing to different...
very simple question, in a KornShell script, I want to assign a value to a variable, do I use single quote, double-quote, or what? What is the rule?
these two work, so no quotes at all
LOA...
I am writing a shell script which uses commands like ssh, scp. Whenever any command fails I want to exit out of the script with an exit status. Please advise how can I do that.
I have a file with list of servernames.
db01a
db01d
I need to do nslookup on them and when I do something like this
nslookup db01a
Server: 05.com
Address: 100.100.00.00
Na...
Hi,
three plsql queries that produce three csv files. These are all run by a ksh file.
I would like a tack on(little addition) to add to the bottom of my script that places the newly created...
I have a text file in the following format:
202 11223344-000 08/28/08
303 12233445-111 05/28/08
I need a script that reads the values in this file and uses those values as variables to an...
Hi,
I have a csv file having two column ; i would like to read row by row and assign them to two variables in loop.
I am using this below script currently :--
awk -F, '{print $1,$2}' ...
I want to loop thru all the sub directories within a directory using shell script. Please advise.
noaccess:x:60002:60002:No Access User:/:/dev/null
nobody4:x:65534:65534:SunOS 4.x NFS Anonymous Access User:/:/dev/null
I have entries similar to the above in two files.
I want to compa...
I don't do much .ksh scripting.
I am in the process of converting from BMC SQLBT to Oracle RMAN.
I have a .ksh that backs up and deletes archived redo logs similar to the dtoarchmon pr...
I have a directory logs which has different sub directories with customers names such as John, Harry, Smith etc.
Each of the sub directories has error.log which is named something like this...
I have a script with two parameters but I'm not able to read to the 2nd parameter.
the script is called like this:
./medpartd_plan2plan_load.ksh 40 mapd
40 is read ok but mapd is reco...
Actually i need help in writing ksh script
i need to write a script that logins into each and evry system and edit nrpe.cfg file and add following ipaddress 152.159.x.x
nrpe.cfg file
...
I have a date column in a file this format 20080712 I want to replace all the values in that column with 20080808. It is csv file and the column is the 4th column using a shell script
I have a script that lists the contents of a directory subject to a filename mask.
How do I strip the first 5 characters from each of the filenames in the list?
I have bunch of commands in a shell script e.g
ls -ltr /export/home/user/clients/$clientDir > $HOME/user.out
which I am outputting to a file. But when the command fails even that I want to...