Sponsored Content
Top Forums Programming Assign a command to execute a file Post 302340508 by rugdog on Monday 3rd of August 2009 04:28:56 PM
Old 08-03-2009
you could do a symlink

ln -s /path/xyz.sh /path/abc

or a hard link if they are in the same filesystem

ln /path/xyz.sh /path/abc

the path of abc can be the same or anyother different from xyz.sh

or you could use an alias.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Monitor log file and execute command

I would like to monitor a log file using a shell script and as soon as a line with a certain string in it appears I would like to run a program. I have been playing around with doing this using tail -f, but cannot get it to work. I found something similar here:... (1 Reply)
Discussion started by: danielsbrewer
1 Replies

2. HP-UX

How to execute a remote file with local command

Hello, I know this is somewhat strange, but please let me know if possible. I want to execute a program file in the remote machine with command on the local machine. Let me make things more clear. Suppose I have a cc on my local system and do not have that on the remote system. I want to use... (2 Replies)
Discussion started by: Veera_Raghav
2 Replies

3. Shell Programming and Scripting

Execute command on first column (filename) retrieved from a file

Hi, I have a file abcd.txt which in turn contains 20 file names as column 1. Now I want to run a command "ct co -nc" / "cp" / "mv" on each of these $1 column content i.e. on each of the 20 file names. How can do this using a script so that I need not run the same command 20 times... (13 Replies)
Discussion started by: royzlife
13 Replies

4. Shell Programming and Scripting

Verify File exists and execute command

Hi, I am trying to verify that a file exists within an alternate directory. If the file exists, it will execute a copy command...if it does not, it should exit the script. I tried the <test> command and the but keep coming up with syntax errors. I am coding in C Shell and the file... (5 Replies)
Discussion started by: CKT_newbie88
5 Replies

5. Shell Programming and Scripting

Take the value of variable from a file and execute a command for each value

Hello Experts, I would like to know the best way to assign a value to variable from a given file and execute a command including this variable for each entry from the file. to be more clear, i have a file with different lines (each line with a different value). i want to substitute the variable... (2 Replies)
Discussion started by: Dendany83
2 Replies

6. Shell Programming and Scripting

find specific file names and execute a command depending on file's name

Hi, As a newbie, I'm desperate ro make my shell script work. I'd like a script which checks all the files in a directory, check the file name, if the file name ends with "extracted", store it in a variable, if it has a suffix of ".roi" stores in another variable. I'm going to use these two... (3 Replies)
Discussion started by: armando110
3 Replies

7. Shell Programming and Scripting

Process to read a new file entry and execute a command

I need to develop a process/daemon which will constantly monitor a file for new entry and execute a command. for eg, there is a file /var/log/inotify.log When a new entry like below gets appeneded to this file, execute the command as follows. /home/user/public_html/bad.php|CREATE ... (2 Replies)
Discussion started by: anil510
2 Replies

8. Shell Programming and Scripting

Modifying bash script to take each line in a file and execute command

I need to modify a bash script to to take each line in a file and execute command. I currently have this: #!/bin/bash if ; then echo "Lipsa IP"; exit; fi i=1 ip=$1 while ; do if ; then rand=`head -$i pass_file | tail -1` user=`echo $rand | awk '{print $1}'` pass=`echo $rand | awk '{print $2}'`... (3 Replies)
Discussion started by: galford
3 Replies

9. Shell Programming and Scripting

How to execute command present config file?

I have written the following shell script #!/bin/bash file="/home/CSV/data.csv" badfile="/home/CSV/bad/" while IFS= read -r line do num_fields=`echo "$line" | awk -F'|' '{print NF}'` field1=`echo "$line" | awk -F'|' '{print $1}'` echo $num_fields echo $field1 done <"$file" the code is... (3 Replies)
Discussion started by: Tomar
3 Replies

10. Shell Programming and Scripting

Execute a Command in a .Dat File and use it in other Files

We have a process where we store the database password in a config file like below from where the password is picked up and used in Database Scripts ID, Password But we now have a Audit Requirement not to have the passwords in Config Files directly. We have a command which could fetch the... (2 Replies)
Discussion started by: infernalhell
2 Replies
FS_WHEREIS(1)						       AFS Command Reference						     FS_WHEREIS(1)

NAME
       fs_whereis - Reports each file server housing a file or directory

SYNOPSIS
       fs whereis [-path <dir/file path>+] [-help]

       fs whe [-p <dir/file path>+] [-h]

DESCRIPTION
       The fs whereis command returns the name of each file server machine that houses the volume containing each directory or file named by the
       -path argument.

OPTIONS
       -path <dir/file path>+
	   Names each AFS file or directory for which to return the host file server machine. Partial pathnames are interpreted relative to the
	   current working directory, which is also the default value if this argument is omitted.

       -help
	   Prints the online help for this command. All other valid options are ignored.

OUTPUT
       The output includes a line for each specified directory or file. It names the file server machine on which the volume that houses the
       specified directory or file resides. A list of multiple machines indicates that the directory or file is in a replicated volume.

       Machine names usually have a suffix indicating their cell membership. If the cell is not clear, use the fs whichcell command to display the
       cell in which the directory or file resides. To display the cell membership of the local machine, use the fs wscell command.

EXAMPLES
       The following example indicates that volume housing the directory /afs/abc.com resides is replicated on both "fs1.abc.com" and
       "fs3.abc.com":

	  % fs whereis -path /afs/abc.com
	  File /afs/abc.com is on hosts fs1.abc.com fs3.abc.com

PRIVILEGE REQUIRED
       None

SEE ALSO
       fs_whichcell(1), fs_wscell(1)

COPYRIGHT
       IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

       This documentation is covered by the IBM Public License Version 1.0.  It was converted from HTML to POD by software written by Chas
       Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.

OpenAFS 							    2012-03-26							     FS_WHEREIS(1)
All times are GMT -4. The time now is 08:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy