Advertisement

Experts have come up with some helpful tips for getting a solution to your problem fast.

 

Welcome! If you have any general questions about Experts Exchange, feel free to ask me.

 
Time Tested ksh Solutions: 51 - 75 of 98
 
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 have the following code. I need to loop through the list of clients. The results get appended to results.out for each client. Then I want to grep for the 3 processes Server1, Order1, Replica...
I grepping a log file for the word failure. I want to execute a loop only if there is no "failure" string in the log file. something like unless grep "failure" ------- ------- but t...
I want to compare two files in a shell script. The files are not sorted. Could I write this comparison as a function as I would need to call this several times in my script? Please advise.
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 ...
If the file is not empty I need to send out with the file else I need to send the message that the file is empty. I need to do this using shell script. Please advise.
In a directory I have four files named something like this source_client002.out dest_client002.out source_client002_data.out dest_client002_data.out. I want to compare the source_client...
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 have a script which generated bunch of messages on the console. I want to grep a particular line "File generated in: /tmp/23180/completed".  The number 23180 would be changing each time I...
I want to find all the sub directories and files with a folder using shell script. I used the following command. Works fine. find /opt/CTCOesd/release -ls But I need the size of the file...
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...
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 to write a script which would create a directories and change the ownership. This script would be run as root. for example: mkdir -p /d/abc/abcd chown (not sure how to write thi...
I need to check if the directory path has been created or not in a ksh script. /d/abc/client/1234 for example I need to check if the following directory path has been created if not writ...
I have a file in a directory in the format exp_131_xxx_1 I need to extract the xxx (its a sequence) and re-use it in another file How do I hook it out?
When I do ps I need to see certain jobs are running or not. Like say process1 and process2. If I could see these jobs in the process list I need to print success else I need to trigger a shell...
I have ssh to a different machine cd and then run a grep for errors in a log file. I want the data in a file from which I had ssh to a different machine. ssh machinename cd logs cat fi...
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...
Hi, I am writing a script in korn shell and need to do the following 1. Check if the incoming DATA file is of zero length 2. and if the DATA file is zero length check if the COUNT file is...
$clientAbbrv ="ABCD" how do I pattern match a file names which are something like this "sourceDL_$clientAbbrv_XXXX_XXXX_loadDirs.out" in a shell script. The XXXX pattern may vary. But the  DL...
I need to create 2 files based on a sequence (e.g. filexxx.a and filexxx.b) One file will be simply be a single line of comma seperated variables (variables generated from within the script...
This is kind of urgent. I was wondering if someone can help me with a regular expression that checks for: VIN should have only A-Z, 0-9 characters, but not I, O, or Q Last 6 characters of...
I want to have some kind of check in my shell script to check if the cvs is installed on the machine where my script is running. Please advise.
Hello All, I am writing a rather trivial ksh  script (on a solaris 5.8) that processes a text file of hosts and ip addresses. I extract the hostname and firstly ping it and if it responds, ...
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  ...