Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to avoid time command output Post 302477036 by rbatte1 on Friday 3rd of December 2010 06:01:31 AM
Old 12-03-2010
I've not met zegrep before, but do you mean you are getting output that has each line preceeded by the file that line has been matched in? If so, use the -h flag.


Sorry if I have missed the point.



Robin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can I avoid the standard output from kill command

I am sending a kill comand to kill a process inside a SH script but I don`t want the user to notice it so I donīt want the message "1222 killed" to appear. I`ve tried to redirect the standard output to /dev/null 2>&1 and also tried to use "nohup" but none of them was succesfull. Can anyone... (1 Reply)
Discussion started by: pguinal
1 Replies

2. UNIX for Advanced & Expert Users

output of the time command ?

can someone tell me the meaning of this commnad, If you want to see a grand total of CPU time for a program when it finishes running, you can use the time command. At the Unix prompt, enter: time java myprog Replace myprog with the name of the program you are running. The following is an... (2 Replies)
Discussion started by: ldpathak
2 Replies

3. Shell Programming and Scripting

how to avoid cron job output to send to the junk email folder?

Hi i created a cron job which invoke a shell script and output some content via email. Some times these output are sent to the junk email folder. i want these mails to be sent to inbox with some specific font. what i have to do? (4 Replies)
Discussion started by: vidhyaS
4 Replies

4. Solaris

Any specific time to reboot the sun server to avoid unplanned outage ??

Hi, Would like to know the uptime or specific time limit to reboot the sun microsystem to avoid unplanned outage. Regards,Tarun (9 Replies)
Discussion started by: taruntan
9 Replies

5. Shell Programming and Scripting

redirect time command output to file (cygwin bash)

I have set up a bash script to run a long list of things that I need to time. I would like to redirect the output of time to a file. I have set it up like, echo "Runtimes for servlet 4, 100K structures" > test_times.txt echo "" >> test_times.txt echo "runs where N=10" >> test_times.txt echo... (7 Replies)
Discussion started by: LMHmedchem
7 Replies

6. Solaris

Find command output gives one day before time stamp

Hi All, I am listing the files which are 4 hours older. For this first I have creted a dummy file with the 4 hours before timestamp, then I am using the below find command, find /path/ -type f ! -newer 4_hours_oledr_file -exec ls -lrt {} \; I am getting the files which are older than... (13 Replies)
Discussion started by: velava
13 Replies

7. Shell Programming and Scripting

Avoid single line output from function

I am new to shell scripting and wished to get few things clarified. While calling functions within shell script, output comes out as single line irrespective of the no of echos or newlines I tried within function + the echo -e used to invoke function ( as instructed online) : #!/bin/sh inc() {... (1 Reply)
Discussion started by: RMath
1 Replies

8. Shell Programming and Scripting

Time field showing Zero in ps command output

F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME COMD 401 S catmgr 5748 5742 0 154 20 e0000006d48cd080 133 e0000003fb6e7200 11:22:32 ? 0:00 /opt/ssh/libexec/sftp-server 3401 R catmgr 5742 5631 0 152 20 e0000005f974fa00 750 ... (4 Replies)
Discussion started by: TomG
4 Replies

9. Shell Programming and Scripting

Send output of time command to file

I am measuring the time it takes for a wget command to complete. Right now my command is: time wget https://`ifconfig -a | grep '32.29.120' | cut -d: -f2 | cut -d' ' -f1`:8443/primary-rest/shop?brandId=test --header="name: test" --no-check-certificate -o SELF_TEST.log The output I get is ... (2 Replies)
Discussion started by: Junaid Subhani
2 Replies

10. Solaris

How to avoid truncating in ps output ?

Hello, This is Solaris 10 (x86) bash-3.2# cat /etc/release Solaris 10 5/09 s10x_u7wos_08 X86 Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 30 March... (5 Replies)
Discussion started by: solaris_1977
5 Replies
TIME(1) 						    BSD General Commands Manual 						   TIME(1)

NAME
time -- time command execution SYNOPSIS
time [-al] [-h | -p] [-o file] utility [argument ...] DESCRIPTION
The time utility executes and times the specified utility. After the utility finishes, time writes to the standard error stream, (in sec- onds): the total time elapsed, the time used to execute the utility process and the time consumed by system overhead. Available options: -a If the -o flag is used, append to the specified file rather than overwriting it. Otherwise, this option has no effect. -h Print times in a human friendly format. Times are printed in minutes, hours, etc. as appropriate. -l The contents of the rusage structure are printed as well. -o file Write the output to file instead of stderr. If file exists and the -a flag is not specified, the file will be overwritten. -p Makes time output POSIX.2 compliant (each time is printed on its own line). Some shells may provide a builtin time command which is similar or identical to this utility. Consult the builtin(1) manual page. ENVIRONMENT
The PATH environment variable is used to locate the requested utility if the name contains no '/' characters. DIAGNOSTICS
If utility could be timed successfully, its exit status is returned. If utility terminated abnormally, a warning message is output to stderr. If the utility was found but could not be run, the exit status is 126. If no utility could be found at all, the exit status is 127. If time encounters any other error, the exit status is between 1 and 125 included. SEE ALSO
builtin(1), csh(1), getrusage(2), wait(2) STANDARDS
The time utility is expected to conform to ISO/IEC 9945-2:1993 (``POSIX''). HISTORY
A time command appeared in Version 3 AT&T UNIX. BSD
June 6, 1993 BSD
All times are GMT -4. The time now is 09:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy