Seems I'm inundating this forum with questions, but anyway:
I am writing a script that should accept one and only one argument when called.
That argument should designate a file, either with path/filename or just filename.
Now to the difficult bit:
I want to figure out a way to store... (9 Replies)
The line is simple, use " '{ print $1"]"$2"\"$3THE " NEEDS TO GO HERE$4 }'
I've tried \", "\, ^" and '"" but none of it works. What am I missing? Putting in the [ between $1 and $2 works fine, I just need to do the same with a ".
Thanks. (2 Replies)
Hi
I am trying to use sed to retrieve part of my html file's path. I am having a hard time getting what I want. Could someone give me some help?
I want to retrieve the section after html and before the file name
For example if I have the following, ... (3 Replies)
I'm trying to clean up my samba share and need to print the found file or print the path of the image it tried to searched for. So far I have this but can't seem to get the logic right. Can anyone help point me in the right direction?
for FILE in `cat list`; do
if ;
then
... (1 Reply)
Can any one tell me that how can i print all directory with their path in a given parent directory.
i.e. parent directory /home/usr/
Now this shoe directory may contain sevral directory
/home/usr
dir1/
dir1.1/
dir1.2/
dir2
dir2.1/
dir2.2/
... (5 Replies)
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
/a/b/c/
/q/w/e/
How to get the same through shell script?... (7 Replies)
hi,
i have a directory at /path/unix with the following files
1.txt
2.txt
3.txt
4.txt
I want to make another file called filenames.txt at a different location called /path/home. So, my output file would be
/path/home/filenames.txt with contents
/path/unix/1.txt... (1 Reply)
My input is as below :
/splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt
/splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt
/splunk/scrubbed/loyal/IFIND.HELLO.WROC.txt
/splunk/scrubbed/triumph/ifind.triumph.txt
From the above input I want to extract the file names only .
Basically I want to... (5 Replies)
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
What is the difference ../directory path and ./directory path in ksh? (1 Reply)
Discussion started by: TestKing
1 Replies
LEARN ABOUT HPUX
link
link(2) System Calls Manual link(2)NAME
link() - link to a file
SYNOPSIS DESCRIPTION
The system call creates a new link (directory entry) for the existing file. path1 points to a path name naming an existing file. path2
points to a path name naming the new directory entry to be created.
RETURN VALUE
Upon successful completion, returns zero. Otherwise, it returns -1 and sets (see errno(2)) to indicate the error.
ERRORS
The system call fails and no link is created if one or more of the following is true:
A component of either path prefix denies search permission.
The requested link requires writing in a directory
that does not permit writing.
The user's or group's disk quota block limit has been reached for this file system.
The link named by
path2 exists.
path points outside the allocated address space of the process. The reliable detection of this error is implementation
dependent.
Too many symbolic links were encountered in translating either path name.
The maximum number of links to a file would be exceeded.
Either the specified path exceeds
bytes, or a component of either specified path exceeds while is in effect.
The file named by
path1 does not exist.
A component of either path prefix does not exist.
path2 points to a null path name.
path1 or path2 is null.
The directory to contain the file cannot be extended.
A component of either path prefix is not a directory.
The file named by
path1 is a directory and the effective user ID is not a user who has appropriate privileges. Some file systems
return this error whenever path1 names a directory, regardless of the user ID.
The requested link requires writing in a directory
on a read-only file system.
The link named by
path2 and the file named by path1 are on different logical devices (file systems).
SEE ALSO cp(1), link(1M), symlink(2), unlink(2), symlink(4), privileges(5).
STANDARDS CONFORMANCE link(2)