Sponsored Content
Top Forums UNIX for Dummies Questions & Answers extract only file name from full path file name Post 7867 by devnul on Tuesday 2nd of October 2001 08:35:39 PM
Old 10-02-2001
basename "/path/to/some/file"

;-)

- dEvNuL
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

process executable file full path

hi guys i give "ps -ef | grep some_executable_file" on the command line. this "some_executable_file" resides on many paths which r included in the PATH environment variable, so the output depicts only "some_executable_file" in the COMMAND column. how can i get the full path? thanx (3 Replies)
Discussion started by: xtrix
3 Replies

2. UNIX for Advanced & Expert Users

list all files with full path of the file

How can i list every single file on a sun solaris server running 2.8 starting from '/' with the full path included in it? example. / ... ... ... /etc/inetd.conf /etc/passwd /etc/shadow ... ... ... /var/adm/messages /var/adm/messages.0 /var/adm/messages.1 ... ... ...... (4 Replies)
Discussion started by: Sowser
4 Replies

3. Shell Programming and Scripting

to find the file with full path

Hi, I have written this shell script: fl=`ls -1lrt $mylist | grep '\.xml$' | awk '{print $9}'` echo $fl (1) for i in $fl do for dir in $mylist do if then echo $dir/$i >> tmp (2) fi done done The mylist contains some directory names. The satement (1) gives the sorted list... (5 Replies)
Discussion started by: surjyap
5 Replies

4. Shell Programming and Scripting

list file with full path

This has been bugging me for a while. How can i list file to show full path. /directory/test $ ls file.tst file.tst $ desired output: /directory/test/file.tst (2 Replies)
Discussion started by: ryandegreat25
2 Replies

5. Shell Programming and Scripting

Retrieve directory path from full file path through sh

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)
Discussion started by: royzlife
7 Replies

6. Shell Programming and Scripting

Return Full File Path To Array PERL

Iam trying to load the full path of multiplie files in the same directory to an array if the filenames matches a pattern. The following is the current code; where $input=C:\test # change to and open the comparison directory chdir("$input2") || die "Cannot change dir: $!"; opendir(DIR2,... (2 Replies)
Discussion started by: cold_Que
2 Replies

7. Shell Programming and Scripting

How to extract strings from full path when full path is not fixed

/Path/snowbird9/nrfCompMgrRave1230100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird6/nrfCompMgrRave1220100920.log.gz:09/20/2010 06:14:51 ERROR Error Message. /Path/snowbird14/nrfCompMgrRave920100920.log.gz:09/20/2010 06:14:51 ERROR Error Message.... (0 Replies)
Discussion started by: Shirisha
0 Replies

8. Shell Programming and Scripting

Need to extract a folder from a full path

Hi everyone, I have different folders which looks like this: /mnt/ecrm/master/ecrm/templates/brochure/de_DE/zeitlos.ott /mnt/ecrm/master/ecrm/templates/mail/en_US/default.html /templates/header_and_footer/en_US/default.txt I want to get the bold text only in a variable. I already have a... (3 Replies)
Discussion started by: evilass
3 Replies

9. Shell Programming and Scripting

Grep File Full Path in a file

Hi, I would like to know how to grep all the paths in a file having extension .BMP For e.g. File Name : sample.txt File Content : xxxxxxxxxxxxxxxxx xxxxx/root/cdrive/picure.BMP xxxx xxxxxxxxxxx xxxxx/root/ddrive/picure.BMP xxxx xxxxxxxxxxx Expected Output : ... (4 Replies)
Discussion started by: vdivb
4 Replies

10. Linux

How to print full path name along with file extension?

Hi I have a requirement like this: /abc/a/x.txt /abc/a/y.txt /abc/b/x.gz /abc/b/y.txt I need output like this: /abc/a:*.txt /abc/b:*.txt /abc/b:*.gz I have tried find /abc -type f -name "*.*" ||awk -F . '{print $NF}' it is print only extensions without path name. Please... (5 Replies)
Discussion started by: lijjumathew
5 Replies
scrollkeeper-devel(1)						   User Commands					     scrollkeeper-devel(1)

NAME
scrollkeeper-devel, scrollkeeper-extract, scrollkeeper-gen-seriesid, scrollkeeper-preinstall - utilities for working with OMF documents and the scrollkeeper database SYNOPSIS
scrollkeeper-extract file stylesheet output [stylesheet output...] scrollkeeper-gen-seriesid scrollkeeper-preinstall docfile omf-file1 omf-file2 DESCRIPTION
scrollkeeper-extract is used internally by scrollkeeper to convert DocBook/SGML files to Docbook/XML files if necessary, and to apply a number of transformations to the XML file to extract information from the XML file. scrollkeeper-gen-seriesid generates a globally unique series ID for an OMF file. scrollkeeper-preinstall reads omf_file1, changes the URL attribute of the identifier tag to doc_file and writes the output to omf_file2. scrollkeeper-preinstall can be used during the document installation process to point OMF files to the correct location on the target machine before registration in the scrollkeeper database. OPTIONS
None. OPERANDS
The following operands are supported: docfile Specifies the file path to the document that omf-file1 describes. file Specifies the XML file that is to be used as input for XSLT transformations. omf-file1 Specifies the OMF file that contains metadata for docfile. omf-file2 Specifies the file created by scrollkeeper-preinstall, which contains the same data as omf-file1 except that the URL attribute of the identifier tag is changed to docfile. output Specifies the file that contains the result when the preceding stylesheet has been applied to file. stylesheet Specifies an XSLT transformation to apply. EXAMPLES
Example 1: Creating a New scrollkeeper Series ID example% scrollkeeper-gen-seriesid Example 2: Extracting a TOC From a Document example% scrollkeeper-extract /path/to/xml/file.xml /usr/share/scrollkeeper/stylesheets/toc.xsl /path/to/toc.xml EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/scrollkeeper-extract The command-line executable for the scrollkeeper-extract application. /usr/bin/scrollkeeper-gen-seriesid The command-line executable for the scrollkeeper-gen-seriesid application. /usr/bin/scrollkeeper-preinstall The command-line executable for the scrollkeeper-preinstall application. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-libs-devel | +-----------------------------+-----------------------------+ |Interface stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
scrollkeeper(1) NOTES
Written by Sander Vesik, Sun Microsystems Inc., 2003. SunOS 5.10 01 Apr 2003 scrollkeeper-devel(1)
All times are GMT -4. The time now is 12:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy