I have a script that "runs" a script. For example:
runscript puts pcnmc01.ksh into the background with log output going to the logfile.
After executing the command, I get this output:
In order for me to look at the logfile, I copy the text, then type
where the logfile is pasted into the terminal. How can I capture this logfile value into the shell session that I am currently in? For example, if there's a way for me to capture this output, and store it in my current shell as variable $logfile, then I can set up an alias to type
saving me a lot of mousing and typing. This is my first post, and I am an AIX beginner. Your help is greatly appreciated. Thank you!
Last edited by Scott; 06-03-2010 at 04:26 PM..
Reason: Removed formatting, added code tags
I'm able to read & print an array in varaible called "filelist"
I need to pass this array variable to a function called verify() and then read and loop through the passed array inside the function.
Unfortunately it does not print the entire array from inside the funstion's loop.
#/bin/ksh... (5 Replies)
hello friend good morning
I have a problem, how can I take the value that the PROCEDURE returns to me in the variable "CodError", when the connection to the bbdd is closed I lose the value and I need it in the shell
#AIX
cat <<EOF | sqlplus -s ${ORA_LOGIN}/${ORA_PASSWORD} > $logftmp
set... (6 Replies)
I'm trying to create a ksh script that will ask the user for the port number. $PORT1 is the variable I want to use that will contain whatever numbers the user inputs. The script would edit ports.txt file, search and delete "./serv 110.1.0.1.$PORT1 200;=3" .
So if the user types 50243 then the... (5 Replies)
Hello,
May i please know how do i pass the shell variable to awk expression in the below script. It is returning null
#!/bin/bash
UNINUM=720922
UNINUM_DESC=`awk -F'|' -v UNINUM=$2 '/UNINUM/ {print $4}' datafile`
echo $UNINUM_DESC
datafile
4|First|720194|asdasdad
4|First|720735|asdasdsa... (8 Replies)
Hi
I am plotting a series of CDFs using gnuplot using
plot "data" u 1:(1./x.) smooth cumulative
I am doing this over many files and I need to tune the x value to the number of lines that meets a particular condition.
Is it possible to get the line count from shell using
cat file | grep... (7 Replies)
I know this topic has been dealt with previously, but the solutions I've seen don't work for me apparently.
I need to pass a variable defined in the shell to one in awk:
$ echo $var1
3
$ cat aaa
aaa 1
bbb 2
ccc 3
ddd 4
eee 5I've tried this, without success:
$ awk... (2 Replies)
I'm trying to store the response from a nawk command inside of a ksh script. The command is:
text=$(nawk -F: '$1 ~ /${imgArray}/ {print $2}' ${etcDir}/captions.txt)
From what I can tell, the imgArray variable is not being expanding when it is inside the single quote ('). Is there something I... (4 Replies)
Hi,
I am writing a ksh script which will use sqlplus to run a sql and pass 2 variables as the SQL request. In the ksh script, I have 2 variables which are $min_snap and $max_snap holding 2 different numbers.
Inside the same script, I am using SQLPLUS to run an Oracle SQL script,... (6 Replies)
Hi ,
i am beginner to Unix, I have one small script which execute java programme,it has java command input output structure . Right now i have given Input output structure manually that is on same directory, now how can i pass that by commandline
#!/bin/sh
java Classjava input.txt... (5 Replies)