Sponsored Content
Top Forums Shell Programming and Scripting Enabling a script to run in multiple paths Post 302172269 by Franklin52 on Monday 3rd of March 2008 06:48:50 AM
Old 03-03-2008
Some possibilities:

- make an alias in your .profile
- place the script in a directory that's set in the PATH variable
- add the path of your script in the PATH variable

Regards
 

9 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Multiple Paths to SAN with LVM in Linux?

I'm setting up a CentOS 5 server that will be connected to an HP EVA4000. My previous experience is with an HP VA7400 and HP-UX. In HP-UX I can add "alternate paths" to a volume group in order to have redundant paths to the SAN via dual fiber channel HBAs just by either adding them with... (3 Replies)
Discussion started by: deckard
3 Replies

2. Shell Programming and Scripting

find multiple paths

How do i find files in more than one directory? I searched through forums, but could not land into the right thread. I tried something like find dir1|dir2 -name file1 but it doesn't work. Please suggest. (5 Replies)
Discussion started by: krishmaths
5 Replies

3. Shell Programming and Scripting

Script to run php script on multiple website domains

Good Day, I have multiple websites on a domain. I am looking for a loop structure that can run each site script. egdomain1/test.php domainx/test.php so on, currently I copy and paste a list of commands but that skips certain commands. Some help would be greatly appreciated. Sergio (3 Replies)
Discussion started by: SergioP
3 Replies

4. Shell Programming and Scripting

Replace directory paths in multiple files at once

I need to update about 2400 files in a directory subtree, with a new directory path inside the files I need to change this occurence in all files: /d2/R12AB/VIS/apps/tech_st/10.1.2 with this: /u01/PROD/apps/apps_st/10.1.3 I know how to change single words using "find . -type f -print0 |... (6 Replies)
Discussion started by: wicus
6 Replies

5. Shell Programming and Scripting

Script to delete files older than x days and also taking an input for multiple paths

Hi , I am a newbie!!! I want to develop a script for deleting files older than x days from multiple paths. Now I could reach upto this piece of code which deletes files older than x days from a particular path. How do I enhance it to have an input from a .txt file or a .dat file? For eg:... (12 Replies)
Discussion started by: jhilmil
12 Replies

6. Shell Programming and Scripting

Storing multiple file paths in a variable

I am working on a script for Mac OS X that, among many other things, gets a list of all the installed Applications. I am pulling the list from the system_profiler command and formatting it using grep and awk. The problem is that I want to be able to use each result individually later in the script.... (3 Replies)
Discussion started by: cranfordio
3 Replies

7. Shell Programming and Scripting

Run script on multiple files

I have a script that I need to run on one file at a time. Unfortunately using for i in F* or cat F* is not possible. When I run the script using that, it jumbles the files and they are out of order. Here is the script: gawk '{count++; keyword = $1} END { for (k in count) {if (count == 2)... (18 Replies)
Discussion started by: newbie2010
18 Replies

8. Shell Programming and Scripting

Wget from multiple paths

if I have these wildcards to download from: path1/*.txt path2/*.txt path3/*.txt path4/*.txt path5/*.txt under a link such as this: http://abc .com/]abc.com Can wget be written in such a way to extract only those files and create the corresponding paths under a target folder? So the... (4 Replies)
Discussion started by: Devyn
4 Replies

9. UNIX for Dummies Questions & Answers

Run script on multiple files

Hi Guys, I've been having a look around to try and understand how i can do the below however havent come across anything that will work. Basically I have a parser script that I need to run across all files in a certain directory, I can do this one my by one on comand line however I... (1 Reply)
Discussion started by: mutley2202
1 Replies
symlink(2)							System Calls Manual							symlink(2)

NAME
symlink - make symbolic link to a file SYNOPSIS
DESCRIPTION
The function creates a symbolic link. Its name is the pathname pointed to by path2, which must be a pathname that does not name an existing file or symbolic link. The contents of the symbolic link are the string pointed to by path1. RETURN VALUE
Upon successful completion, returns 0. Otherwise, it returns -1 and sets to indicate the error. ERRORS
If fails, is set to one of the following values: [EACCES] Write permission is denied in the directory where the symbolic link is being created, or search permission is denied for a component of the path prefix of path2. [EEXIST] The path2 argument names an existing file or symbolic link. [EFAULT] path1 or path2 points outside the process's allocated address space. The reliable detection of this error is implementation-dependent. [EIO] An I/O error occurred while reading from path1, making the directory entry for path2, allocating the inode for path2, or writing out the link contents of path2. [ELOOP] Too many symbolic links were encountered in resolving path2. [ENAMETOOLONG] The length of the path2 argument exceeds or pathname resolution of a symbolic link produced an intermediate result that exceeds or a pathname component is longer than [ENOENT] A component of path2 does not name an existing file or path2 is an empty string. [ENOSPC] The directory in which the entry for the new symbolic link is being placed cannot be extended because no space is left on the file system containing the directory, or the new symbolic link cannot be created because no space is left on the file system which will contain the link, or the file system is out of file- allocation resources. [ENOTDIR] A component of the path prefix of path2 is not a directory. [EROFS] The new symbolic link would reside on a read-only file system. APPLICATION USAGE
Like a hard link, a symbolic link allows a file to have multiple logical names. The presence of a hard link guarantees the existence of a file, even after the original name has been removed. A symbolic link provides no such assurance; in fact, the file named by the path1 argu- ment need not exist when the link is created. A symbolic link can cross file system boundaries. Normal permission checks are made on each component of the symbolic link pathname during its resolution. AUTHOR
was developed by the University of California, Berkeley. SEE ALSO
cp(1), chown(2), link(2), lstat(2), open(2), readlink(2), unlink(2), symlink(4), <unistd.h>. STANDARDS CONFORMANCE
CHANGE HISTORY
First released in Issue 4, Version 2. symlink(2)
All times are GMT -4. The time now is 02:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy