Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Need help with 2 similar commands with different outputs Post 302655533 by RedSpyder on Wednesday 13th of June 2012 09:50:19 AM
Old 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 may have accidentally redefined one of the outputs...

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

Printing outputs using awk.

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

LotusScript similar to shell commands - need help

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

compare 2 outputs

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

Multiple Substring Outputs

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

strcat outputs garbage

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

create outputs from other command outputs

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

Storing outputs into variables

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

AWK - Different outputs *Question*

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

Comparing wc outputs using array

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
TIME(2) 						     Linux Programmer's Manual							   TIME(2)

NAME
time - get time in seconds SYNOPSIS
#include <time.h> time_t time(time_t *t); DESCRIPTION
time returns the time since the Epoch (00:00:00 UTC, January 1, 1970), measured in seconds. If t is non-NULL, the return value is also stored in the memory pointed to by t. RETURN VALUE
On success, the value of time in seconds since the Epoch is returned. On error, ((time_t)-1) is returned, and errno is set appropriately. ERRORS
EFAULT t points outside your accessible address space. NOTES
POSIX.1 defines seconds since the Epoch as a value to be interpreted as the number of seconds between a specified time and the Epoch, according to a formula for conversion from UTC equivalent to conversion on the naive basis that leap seconds are ignored and all years divisible by 4 are leap years. This value is not the same as the actual number of seconds between the time and the Epoch, because of leap seconds and because clocks are not required to be synchronised to a standard reference. The intention is that the interpretation of sec- onds since the Epoch values be consistent; see POSIX.1 Annex B 2.2.2 for further rationale. CONFORMING TO
SVr4, SVID, POSIX, X/OPEN, BSD 4.3 Under BSD 4.3, this call is obsoleted by gettimeofday(2). POSIX does not specify any error conditions. SEE ALSO
ctime(3), date(1), ftime(3), gettimeofday(2) Linux 2.0.30 1997-09-09 TIME(2)
All times are GMT -4. The time now is 11:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy