which command difference


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers which command difference
# 1  
Old 04-07-2011
which command difference

What is the difference between (unix-system “which [name]) and which [name] commands.

For example when I use the (unix-system “which visual_elite) command I get the following result:

/home/vhdl/edatools/mentor/visualelite/VisualElite-4.2.1/Linux2.4/bin/visual_elite

When I do the same on the command line using which visual_elite I get

enidl-atlas-schur <76> # which visual_elite
visual_elite is /home/vhdl/edatools/mentor/visualelite/VisualElite-4.2.1/visual_elite
Why do I have this difference?


Thanks,
Mihaela
# 2  
Old 04-08-2011
This functionality can be the executable, like /bin/which, or a shell built-in, ksh calls it whence. If the PATH is not exported, the execuatble may get a different answer. Some are more chatty than others. The built-in is faster, but /bin/sh probably has neither which nor whence.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

What is the difference in this two awk command?

What is the difference in these two awk command? Both returns same output but I am not sure what is the use of +0 in command 1. awk -F "," '{print $1+0,$2+0,$3+0}' awk -F "," '{print $1, $2, $3}' (3 Replies)
Discussion started by: later_troy
3 Replies

2. UNIX for Dummies Questions & Answers

Explain difference of tar command

Hello All, I have been seeing a weird(at least for me, at this point) issue with a specific tar command. 1st fashion) Normally, if i have to tar anything at the command line I tend to use tar -cvzf <tar-file_name.tgz> <directory_to_be_tarred> this command works perfectly fine with out... (1 Reply)
Discussion started by: getnetha
1 Replies

3. Shell Programming and Scripting

Difference between command line and script

i have a bit of a unique question. is there a way to know if a script is being run from from the command line or from another script? example: command line: ### ./autorun.sh ERROR: not permitted to run script from the commandline. exiting... but if i put "autorun.sh" into another... (4 Replies)
Discussion started by: SkySmart
4 Replies

4. Shell Programming and Scripting

What's the difference between print and printf in command?

For example, in this command: ls /etc/rc0.d/ -print ls /etc/rc0.d/ -printfThe outputs are quite different, why? (7 Replies)
Discussion started by: Henryyy
7 Replies

5. UNIX for Dummies Questions & Answers

command difference - find

Hi, What is the difference between these two? find /some_dir -type f -exec chmod 070 {} \; and chmod 070 `find /some_dir -type f` Thanks (5 Replies)
Discussion started by: lamont
5 Replies

6. UNIX for Dummies Questions & Answers

Difference in command syntax different shells

hi, i am aa unix amateur and i am using tsh, csh and bash most of the time. i have been looking over the net to find a summary of the differences in command syntax for example: in csh and tsh you do alias whatday date while in bash and ksh you do alias whatday=date i just want more... (2 Replies)
Discussion started by: hobiwhenuknowme
2 Replies

7. Programming

Difference between cp and mv linux command

Hi, I am facing one problem only with mv command not with cp command. I have a test program #include <stdio.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/mount.h> #include <fcntl.h> #include <errno.h> int sync_file(char *file) { FILE *fp=NULL;... (6 Replies)
Discussion started by: dharshini123
6 Replies

8. UNIX for Dummies Questions & Answers

su command difference between unix and linux

Hello all the su with -l option is running normal with linux but when i try to run it on unix AIX 5.2.7 it's not working with -l option any help (6 Replies)
Discussion started by: islam.said
6 Replies

9. AIX

difference between ls -b and ls command

hi anyone please tell me what is the difference between ls -b command and ls command. (1 Reply)
Discussion started by: sathish2win
1 Replies

10. UNIX for Dummies Questions & Answers

typeset and export command difference

Can anyone please explain what the difference is between these two commands typeset - ? export - i know with this even child process can read the variable Declare - ? i use bash shell http://cnswww.cns.cwru.edu/~chet/bash/bashref.html#SEC58 states that " The typeset command is... (0 Replies)
Discussion started by: systemsb
0 Replies
Login or Register to Ask a Question