Visit Our UNIX and Linux User Community


how to avoid time command output


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how to avoid time command output
# 1  
Old 12-03-2010
how to avoid time command output

Hi,

I have 2 queries

1 .when I run some unix command, I am getting the output of "time" at std output (screen)

for eg

zegrep <pattern> *.v.gz

I almost found the reason but not sure, if the no of files matching *.v.gz is more then I am getting the time command output at the screen

whereas if i give

zegrep <pattern> design_name.v.gz, I am not getting the time output in my screen

so my question is how to avoid the time command output at my screen when the unix command is working on multiple files

2. similalry when I execute a csh script at the end of the script execution, I am getting the time command output at my screen. how to avoid that too

thanks in advance

Regards,
Selva
# 2  
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
# 3  
Old 12-06-2010
hi robin,

thanks for the input but I suppose you missed the point

i know -h will avoid printing the matching file name

my doubt is after executing is. i will make my question generic

In my shell commmand (csh) when I execute some time consuming command, after the execution of the command

i am getting the output of unix "time" command at the screeen

something like below

1764.561u 804.430s 287:14:27.59 0.2% 0+0k 144+0io 244pf+0w


so my query is how to avoid that ?

thanks,
selva
# 4  
Old 12-06-2010
Do you have an alias set ? What happens when you issue:
Code:
alias

# 5  
Old 12-07-2010
Hi Scrutinizer,

yes I have lot of alias, when I type alias I am getting the description of all the alias that I have set in .aliases file

will that matter to cause time output to come at the screen ?

I am using it past 6 months without any issue

Regards,
Selva..
# 6  
Old 12-07-2010
Perhaps there is an alias for zegrep in there?
What happens when you do this:
Code:
\zegrep <pattern> *.v.gz

It could also be that your PATH variable has changed? What does
Code:
which zegrep

give?
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #198
Difficulty: Easy
Bash ranked in the top 20 programming languages according to the TIOBE Index for October 2019.
True or False?

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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

Featured Tech Videos