11-22-2011
Quote:
Originally Posted by
jlliagre
Don't use "which". This command is only searching the PATH for the queried command. Only a builtin command can tell if another command is a builtin or not, this builtin is "type" with bash.
Didn't even think of that. Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I want to know if there is a way to send unix commands thru FTP from a mainframe to kick off Autosys Jobs. I just need to send a command from the mainframe to UNIX and have UNIX execute that command. (2 Replies)
Discussion started by: skammer
2 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I am new to UNIX programming. Can you send me the links where we can find all commands and their description in UNIX.
Help in this regard is highly appreciated.
Regards,
Azaz Ali. (1 Reply)
Discussion started by: azazalis
1 Replies
3. UNIX for Dummies Questions & Answers
I am able to run the UNIX commands in a Windows box from a UNIX box through "SSH" functionality. But whenever the SSH connection is established between UNIX and Windows, password for windows box is being asked.
Is there a way to avoid asking password whenever the SSH connection is made? Can I... (1 Reply)
Discussion started by: D.kalpana
1 Replies
4. UNIX for Dummies Questions & Answers
Hello Folks
Where can I find all the unix commands with explanations , on the internet. I am searching but most of the sites are listing a few of the important ones. PLease guide through
thanks (4 Replies)
Discussion started by: supercops
4 Replies
5. Shell Programming and Scripting
I have a text file that contains 4 million lines, each line contains 2 fields(colon as field separator). as shown:
123:444,555,666,777,888,345
233:5444,555,666,777,888,345
623:454,585,664,773,888,345
......
Here I have to split the second field(can be up to 40,000 fields) by comma into an... (14 Replies)
Discussion started by: kevintse
14 Replies
6. Shell Programming and Scripting
Hi Guys,
Happy New Year to you all!
I have a requirement to read an embedded new-line using KSH's read builtin.
Here is what I am trying to do:
run_sql "select guestid, address, email from guest" | while read id addr email
do
## Biz logic goes here
done
I can take care of any... (6 Replies)
Discussion started by: a_programmer
6 Replies
7. UNIX for Dummies Questions & Answers
I need some help with a unix command. I want to download files from a directory, this is the url of one of the files
http://www.brugmansia.us/forums/uploads/packages-0296224001353469825.jpg
And there are several hundred that start with
http://www.brugmansia.us/forums/uploads/packages-
... (1 Reply)
Discussion started by: Mary Voss
1 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
I've been using zsh for a while, and was enjoying the builtin "kill" with tab completion. But since I installed "oh-my-zsh" the kill completion has stopped working. I have not edited my new ~/.zshrc file.
My ~/.oh-my-zsh/lib/completions.zsh contains the following:
zstyle... (0 Replies)
Discussion started by: nickednamed
0 Replies
9. UNIX for Dummies Questions & Answers
I'm attempting to emulate another users .zshrc file. However, I'm sort of confused on what exactly the -g argument does for the typeset builtin. Here's what he has in his .zshrc file:
typeset -ga sources
sources+="$ZSH_CONFIG/environment.zsh"
sources+="$ZSH_CONFIG/options.zsh"... (4 Replies)
Discussion started by: brandontdr
4 Replies
10. Shell Programming and Scripting
I'm adapting a BASH script to run with an absolute minimal amounts of Cygwin64 files so colleagues using Windows can use it without installing Cygwin.
I am down to the following in /bin only (replacing cut with parameter substitution eliminated all needed things in /etc)
bash.exe
cygattr-1.dll... (5 Replies)
Discussion started by: Michael Stora
5 Replies
time(1) General Commands Manual time(1)
NAME
time - Times the execution of a command
SYNOPSIS
time [-p] command [argument...]
The time command prints the elapsed time during the execution of a command, the time spent in the system, and the time spent in execution
of the command on the diagnostic output system.
Note
The C shell has a built-in version of the time command. If you are using the C shell, and want to guarantee that you are using the command
described here, you must specify the full path /usr/bin/time. See the csh(1) reference page for a description of the built-in command.
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
time: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
Writes the timing output to standard error. This is the default.
OPERANDS
The name of a command to be executed. If command identifies any name specified as a special built in your applicable shell reference page,
the results are undefined and unpredictable. The argument to be passed to command. See the appropriate reference pages for these values.
This parameter may include flags and arguments expected by command.
DESCRIPTION
The time command prints the elapsed time during the execution of a command, the time spent in the system, and the time spent in execution
of the command on the diagnostic output system. Time is reported in seconds.
The time command (with a different format) is also built into csh.
NOTES
When time is used as part of a pipeline, the times reported are unspecified, except when it is the sole command within a grouping command
in that pipeline. For example, the commands on the left are unspecified; those on the right report on utilities a and c, respectively.
time a | b | c { time a } | b | c a | b | time c a | b | (time c)
EXIT STATUS
The time command returns the following exit values if the command could not be invoked: An error occurred in the time command. The command
specified by command was found but could not be invoked. The command specified by command could not be found.
If the command was successfully invoked, the exit status of time is the exit status of command.
EXAMPLES
To measure the time required to run a program, enter: time a.out
This runs the program a.out and writes to the standard error output the amount of real, system, and user time that it uses: real
10.5 user 0.3 sys 3.6 To measure the time required by a complex command, enter: time sh -c 'complex-cmmand-line'
This runs all of the commands, which may include pipelines, and returns the time information for the entire series of commands.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of time: Provides a default value for the internationalization variables that are
unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari-
ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value,
overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for-
mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of
LC_MESSAGES. Determines the path used to locate command.
SEE ALSO
Commands: csh(1), ksh(1), Bourne shell sh(1b), POSIX shell sh(1p)
Functions: times(3)
Standards: standards(5)
time(1)