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
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)
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)
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)
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)
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)
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)
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 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 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)
Discussion started by: mohtashims
5 Replies
LEARN ABOUT PLAN9
times
times(1) User Commands times(1)NAME
times - shell built-in function to report time usages of the current shell
SYNOPSIS
sh
times
ksh
times
DESCRIPTION
sh
Print the accumulated user and system times for processes run from the shell.
ksh
Print the accumulated user and system times for the shell and for processes run from the shell.
On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways:
1. Variable assignment lists preceding the command remain in effect when the command completes.
2. I/O redirections are processed after variable assignments.
3. Errors cause a script that contains them to abort.
4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari-
able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not
performed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO ksh(1), sh(1), time(1), attributes(5)SunOS 5.10 15 Apr 1994 times(1)