06-13-2012
Yeah the problem is that I didnt used "" around $TIME. Put them and it worked.
Thanks!
10 More Discussions You Might Find Interesting
1. Solaris
I get unexpected results when doing ls -al | more and ls -al | grep.
When I do not pipe the output, it comes to the screen just fine, and there is output!
When I pipe to another command, I either get nothing, or else I get a strange dump.
Which of the outputs have I accidentally affected?... (2 Replies)
Discussion started by: joang
2 Replies
2. Shell Programming and Scripting
I have a output of a command like this.
the command is : bdf|sed '/^e/d'|awk '{print$2/1048576}'
output :
0
0.515625
0.481979
2
2
2
7.8125
4
2
0.488281
7.8125
3.90625
4
1.95312
1
0.488281 (4 Replies)
Discussion started by: Krrishv
4 Replies
3. Shell Programming and Scripting
I am running the following commands but only the second part executes. I can't get the file to exit if the first statement is true, anyone have an idea? I know it's not UNIX but this is the best crowd for knowledge in all fields...
Sub Querysave(Source As Notesuidocument, Continue As Variant)... (0 Replies)
Discussion started by: bushey1
0 Replies
4. Shell Programming and Scripting
Hello,
I have a shell script that is used as follows:
./script -s <Oracle_server_name>
the script returns several lines in this format:
parameter name required value Current Value comments
--------------- ------------- -------------- ---------
My objective now is to compare 2... (1 Reply)
Discussion started by: melanie_pfefer
1 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I am reading a file with millions of lines in it. Each line is big line containing several xml tags. I need to Output just the value of two tags in a seperate flat file.
For eg- I need to output whats present in <ComponentName> something </ComponentName> and another tag is... (2 Replies)
Discussion started by: sunnybehl
2 Replies
6. Programming
Anyone have any ideas why when using strcat function I would get some garbage at the beginning of the output string? what I'm doing is something like the following example.
Code:
char temp;
char tempHolder;
for(int i=0;i<something;i++){
sprintf(temp,"%u ", someVariable);... (2 Replies)
Discussion started by: airon23bball
2 Replies
7. Shell Programming and Scripting
hi friends,
The code:
i=1
while
do
filename=`/usr/bin/ls -l| awk '{ print $9}'`
echo $filename>>summary.csv
#Gives the name of the file stored at column 9
count=`wc -l $filename | awk '{print $1}'`
echo $count>>summary.csv
#Gives just the count of lines of file "filename"
i=`expr... (1 Reply)
Discussion started by: rajsharma
1 Replies
8. Shell Programming and Scripting
I need to know how to store output from one command so that it can initiate another command.
chktraf -s | cut -c1-4
output would look like
321
142
256
342
123
Then if the value of the output = 0, then initiate next command.
if
then
for xx in 01 02 03 04 05 06 07 08 09 10
do
... (4 Replies)
Discussion started by: Shaun74
4 Replies
9. UNIX for Dummies Questions & Answers
I'm having a small issue with AWK:
I run this in PUTTY:
awk 'BEGIN{FS=","}NR==FNR{A=$1;next}{if (A==$1) print $0}' FILE1 FILE2 And it gives me the output that I expect.
I wanted to create a file.awk file that i could just run instead of typing this out all the time. But its not giving my... (1 Reply)
Discussion started by: WongSifu
1 Replies
10. UNIX for Advanced & Expert Users
Hi All,
Im trying to compare the wc -l output with another set of rowcount outputs which returned from sql...
For Eg : Im storing the first outputs as below
<srccnt=`wc -l $HOME/*.csv | awk {'print $1'}`
and comparing this with the another set of outputs.
descnt=`seclect count(*)... (7 Replies)
Discussion started by: Deena1984
7 Replies
LEARN ABOUT MOJAVE
lastwords
lastwords(1m) USER COMMANDS lastwords(1m)
NAME
lastwords - print syscalls before exit. Uses DTrace.
SYNOPSIS
lastwords command
DESCRIPTION
This prints the last few system calls for processes matching the given name, when they exit. This makes use of a ring buffer so that the
impact on the system is minimised.
Since this uses DTrace, only users with root privileges can run this command.
EXAMPLES
Catch last few syscalls for dying netscape processes,
# lastwords netscape
FIELDS
TIME time of syscall return, ns
PID process ID
EXEC process name (execname)
SYSCALL
system call
RETURN return value for the system call
ERR errno for the system call
BASED ON
/usr/demo/dtrace/ring.d
DOCUMENTATION
DTrace Guide "Buffers and Buffering" chapter (docs.sun.com)
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver-
bose descriptions explaining the output.
EXIT
lastwords will sample until a command with that name exits.
SEE ALSO
dtruss(1M), dtrace(1M)
version 0.70 Jun 08, 2005 lastwords(1m)