Question regarding whence program


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Question regarding whence program
# 1  
Old 03-27-2015
Question regarding whence program

Hi all,

In production code, if using the whence command it picks the production file.if I am using the test code file. by using whence command it not picking the file. do you have any idea on this.
Code:
Whence prodcode

it picks the exact path of the prodcode.


Code:
whence testcode.

it not pick the exact path of the testcode.

Last edited by Don Cragun; 03-27-2015 at 05:35 PM.. Reason: Fix CODE tags.
# 2  
Old 03-27-2015
Maybe we can help if you answer a few questions:
  1. What operating system are you using?
  2. What shell are you using?
  3. What directory were you in when you ran the command: whence prodcode?
  4. What was the string stored in $PATH when you ran the command: whence prodcode?
  5. In what directory is prodcode located?
  6. What directory were you in when you ran the command: whence testcode.?
  7. What was the string stored in $PATH when you ran the command: whence testcode.?
  8. In what directory is testcode. located?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell program question with Filenames and dates

Hi Unix Gurus Let's say I have the input files like the following. I need to pick the files based on my run date. abcd_20180206.csv abcd_20180213.csv abcd_20180220.csv abcd_20180227.csv efgh_20180206.csv efgh_20180220.csv efgh_20180227.csv ijkl_20180206.csv ijkl_20180213.csv... (9 Replies)
Discussion started by: SK123
9 Replies

2. Programming

Question regarding Bash program

Hello All, I am trying to write a small bash script to make my life easier for an analysis. I have multiple folders and inside them are 10 output files with an extension .pdbqt What I am trying to do is to read the folder content and then make a PyMol (.pml) file to load the molecules and then... (11 Replies)
Discussion started by: biochemist
11 Replies

3. Homework & Coursework Questions

Calling compiled C program with Perl program

Long story short: I'm working inside of a Unix SSH under a bash shell. I have to code a C program that generates a random number. Then I have to call the compiled C program with a Perl program to run the C program 20 times and put all the generated random #s into a text file, then print that text... (1 Reply)
Discussion started by: jdkirby
1 Replies

4. Programming

A question about the system call mount in a C program

Dear all, Currently I'm working on a C program (OS = ubuntu 9.0.4)in which a USB key will be mounted and umounted for several times. I read the man page of the mount system call. I use the following test code #include <sys/mount.h> int main(int argc, char *argv) { if... (5 Replies)
Discussion started by: dariyoosh
5 Replies

5. Linux

running java program question

hi, i have just written a simple hello world java program in my linux server, installed jdk ... and tried to compile and run it and it gave me some errors. please details below: # cat HelloWorld.java import java.util.*; import java.io.*; public class HelloWorld { public static void... (4 Replies)
Discussion started by: k2k
4 Replies

6. UNIX for Dummies Questions & Answers

Script to open program and send/execute command in program

Hi, i want to write a script that executes a program (exec?) . this program then requires a filename as input. how do i give it this input in the script so the program will be complete run and close by the script. e.g. exec prog.exe program then asks for filename "enter filename:"... (1 Reply)
Discussion started by: tuathan
1 Replies

7. Shell Programming and Scripting

perl program question

why does below program not work? <> is producing nothing.. still waiting for input.. but i thought this would work? #!/usr/bin/perl -w use strict; my @array2; my @array1 = ("David Veterinarian 56", "Jackie Ass 34", "Karen Veterinarian 28"); $_ = @array1; while (<>) { ... (4 Replies)
Discussion started by: hankooknara
4 Replies

8. UNIX for Dummies Questions & Answers

UNIX Program Change Question

I am an IT auditor with a big 4 accounting firm and am cur the process of conducting an application program change audit for a large public company related to Sarbanes Oxley. This is my first time using this forum and need some assistance in verifying a fact that I believe to be true. My client... (1 Reply)
Discussion started by: mpp122
1 Replies

9. UNIX for Dummies Questions & Answers

UNIX Backup program question

How do UNIX backup programs know which files to dump. Unlike Windows, UNIX files do not have the "archive" bit, yes? So, again, how does it know which file(s) to dump. Thanks in advance. (1 Reply)
Discussion started by: MayDHorseBwithU
1 Replies

10. Programming

QUESTION...simple program?

I am new to the unix/linux environment. AND........ I need to create a mini shell..that displays prompt (i.e., READY:$), accepts a command from std-in, and prints the command and any parameters passed to it. HELP!!!! (8 Replies)
Discussion started by: jj1814
8 Replies
Login or Register to Ask a Question