I want to write something like this in a korn shell script
if [ "_$ClientBox" = "_" || "_$RecBox" = "_" || ("_$post1" = "_" && "_$post2" = "_") ]
This syntax gives an error. Please ...
How do I send a file as attachment as an email to me and cc it to a list of people using UNIX mail/mailx command
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 ...
...
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 all,
I like to create a small unix shell script to unlock and unexpire all the expired and locked user accounts.
example:
>./myscript.sh
the above command has to unlock and unex...
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=...
I recently ran into the following 2 issues :
ORA-00020: maximum number of processes (%s) exceeded
ORA-00018: maximum number of sessions (%s) exceeded
Following link described the problem ...
I want to pass an array as argument to a shell script. And loop through the array within the script for processing.
running the script: script.ksh array
#!/bin/ksh
for array
do
pr...
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...
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...
Can you please provide me with a shell script that does the following task?
In a given file path location there may be one or more text files with different
file names but with the same co...
#!/bin/ksh
echo " Enter Database Details: "
# After entering the details
sqlplus -s /nolog <<DONE #i want to suppress this output
conn sys/passwd@db as sysdba #i want to suppress this o...
Hi Experts
I want to be able to search inside text files in our HP-UX server for a string. The active shell is ksh.
I am currently using:
find . -type f | xargs grep -l -s "findMe"
This ...
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...
I am trying to develop a shell script on AIX 5.3.5 / ksh or ksh93, which will take a text file with fixed-length rows ('records'), and on each row replace certain characters, based on position...
I want to write nested if statement in korn Shell script
if
then
----
elif
then
----
within the elif I want to write another if statement
else
---
fi
Please advise.
Everyone:
Good afternoon. If I wanted the first 4 characters of a string wouldn't I just:
#!/usr/bin/ksh
string=ABCDEJGHIJ
snip=${string:0:4}
echo $snip
I can't seem to make the sni...
if [condition] ;
then
statements;
fi;
i am getting error " unexpected fi"
What is the ftp command to copy a file from local to remote machine?
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...
IN a file I need to check for 3 patterns if all the 3 patterns are in the file. I need to send out an email. All this needs to be done in korn shell script. Please advise.
How do I parse a string and retrieve the last 3 digits and add 4 to the start of the 3 digits
the string could be in following formats:
customer100
cust100
I need to retrieve the las...
I want to make sure the string does not start with a '#' sign. How do I do it in ksh script
Hi,
I need a script which shall purge folders which are older than 30 days from the current date.
Hence for example if today is 08/22/2007 then anything which is before 07/23/2007 should ...
I have 4 columns in a file. in the fourth column I have something like janclient085, febclient 086.
I need to just cut the fourth column from the file and extract the client085, client086 and...