I am trying to write a shell script that will do an HTTP POST from an HP-UX machine. The OS is version HP-UX [B.11.11].
I want to send some data to a web script. How do I do an HTTP post (a...
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%"
result=`isql -Sservername -Uuser -Ppasswd<<EOF
set nocount on
go
select clientname from table
go
EOF`
clientFullName=`echo "${result}"|tail +3`
awk -F, '{print $1}' test.csv| while...
HP Superdome: HP-UX: Korn Shell:
I am building some enviroment validation scripts for this box in KSH.
I need a way of checking if the required ports are opened so that I would run a script ...
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...
Ive got a large test file (around 3 Gb) and ned to parse it and whenever I find a particular label, add the corresponding value.
For example my file may contain
NAME hjhkjhdad
ADDRESS ...
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...
I have to first do ssh using Kornshell for which I used the expect script. After ssh I need to do sudo su. How would I handle that as the sudo su also asks for the password? Please advise.
#!/bin/ksh
clientlist=`awk '{print $1}' client_names.txt`
echo "$clientlist\n"
for client in $clientlist
do
results=`isql -w200 -Sservername -Uuser -Ppasswd <<EOF
select ip_address fro...
I have a directory where the 3 new log files are dropped everday. The older files are not archived. I need to pull out out these files. The files are named in this order:
abc_posDEF_0229200...
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...
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 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}' ...
How do I pad a variable such that it has 4 characters padded with zero
e.g. 1 become 0001 18 become 0018 567 become 0567 and 7677 stays as it is (dont need to wory about more than 4 chara...
Hi, all experts
I received an error message 'incomplete last line' through VI editor. all original lines look like miscoded, I don't know how should I fix it? it's my first time to encounte...
I need to convert all the files from a directory on UNIX to .doc file. I also need to append the header and footer to a .doc file. Header is nothing but the name of the file. Footer shows the ...
I wrote the shell script something like this
while read myline
do
dir=`awk -F: ' /File generated in/{print $2}' $myline`
print "DIR: $2\n"
done < data.out
parsing the file for a patt...
How to check whether a variable starts with certain letters..
example
NAME=ABCD.txt
I want to check in Shell (KSH) whether $NAME starts with "AB"
for execution: script.ksh servername client1, client2, client3
Here i first ssh to the servername and loop through the clients given during the invocation of the script to check if the proces...
I have this excel file which I need to read using the shell script. SO I saved the excel file as .csv file. But I am not sure how to read the csv file. I have 4 columsn in the csv file. I need...
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:
---------------------...
I want to read line by line from a shell script. And check if the first column is client id which is in this format clientXXX or clntXXX. If the first column is clientXXX or clntXXX i want to...
I want to run ls command on a particular directory and retrieve all the permissions/ownership for the sub dir and files within that directory using shell script. Please advise.
perl base.pl clients.txt >> /export/home/client.out
I want to send the above output to the file client.out and also to stdout in a shell script. Please advise.
I need to loop through a bunch of servers using isql. How do I store the server names in an array. And then loop through the array. Using isql I need to connect to the servers. After connectin...