Its just a variable ,added to take any other input that may present in the file ,
like
If you are sure you have only one word per line ,you can skip this.
Last edited by Don Cragun; 06-19-2015 at 09:28 PM..
Reason: Add CODE tags, again.
Hi,
I'm quite new to scripting and I want to modify following line of an existing script:
MYVAR=`subst |grep 'L:\\\:' | sed -e 's/.*\\\//'`;
What I have to do is to use the content of a variable instead of the constant expression 'L:\\\:' as the grep string to be matched.
Assuming I already... (5 Replies)
How...
can I read input by a user character by cahracter. And assign each character from the string to a variable?
Any help would be greatly appreciated!
Thank you! (1 Reply)
Hi Friends...
Please assist me to assign the result of a SQL query that results two column, to two variables.
Pls find the below code that I write for assigning one column to one variable. and please correct if anything wrong..
#! /bin/sh
no='
sqlplus -s uname/password@DBname... (4 Replies)
Hi friends,
firstly, i can run following expression and i took 100 value.
sqlplus -s username/password@TTTEST @umt.sql
umt.sql exists "select t.deger from parametre t where t.id=30".
result of this query =100
i need to assign this value(100) to variable(for example x... (2 Replies)
Hi
im trying to assign the result of the db2 command to a variable inside a shell script...
: tab_cnt=`db2 "select count(*) from syscat.tables where tabname = 'ABC' and tabschema = 'MATT01'" |head -4|tail +4|cut -c 11`
: echo $tab_cnt
when i echo im getting a blank value.. im expecting... (1 Reply)
I see a millioin ways to do this with echo, but what I wan to do is assign a variable the "nth" character of an incoming parameter to a ksh script.
$1 will be "pia"
I need to assign the first character to stmttype. (10 Replies)
Hi,
I have the following command that lists all the .o files from all the directories except of vwin (which I don't want it)
for i in `ls -d */*.o|awk '$0 !~ "vwin"'`; do echo $i; done
The result is something like that
dir1/file1.o
dir1/file2.o
dir2/file3.o
etc.
So, I want to create a... (9 Replies)
Hello,
I have searched but failed to find what exactly im looking for,
I need to eliminate first "." in a output so i can use something like the following
echo "./abc/20141127" | nawk '{gsub("^.","");print}'
what i want is to use gsub result later on, how could i achieve it?
Let say... (4 Replies)
Hi
How to pass echo output to a variable ?
Does below awk command will get the last character of hostname and assign to a variable - "svr" ?
svr=$( echo `hostname` | awk '{print substr($0,length,1)}' )
Thanks.
Please use CODE tags when dsplaying code segments, sample input, and sample... (7 Replies)
Discussion started by: Lim
7 Replies
LEARN ABOUT OPENSOLARIS
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
variable assignment. This means that tilde substitution is performed after the = sign and word splitting and file name genera-
tion 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.11 15 Apr 1994 times(1)