Sponsored Content
Top Forums Shell Programming and Scripting [BASH] Remove Link from Filename Post 302308574 by Syekiya on Sunday 19th of April 2009 11:29:45 AM
Old 04-19-2009
How would I set the basename into a variable?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Remove path from filename

In a foreach loop I end up with $file containing the filename INCLUDING the whole path. I want this reduced to just the filename, but I can't seem to remember how I did it some years back. I am sure I can do it with "sed", but I am pretty sure I have seen a simpler command. Anyone? borgeh (3 Replies)
Discussion started by: borgeh
3 Replies

2. Shell Programming and Scripting

How to remove filename from the path

Hi, I have a list of paths with files at the end. How can strip off filenames. This is what I have: /apps/test/abc/file.txt /apps/new/home/daily/report.xml /apps/old/home/weekly/out/test.sh This is what I need: /apps/test/abc/ /apps/new/home/daily/ /apps/old/home/weekly/out/ ... (10 Replies)
Discussion started by: djanu
10 Replies

3. UNIX for Dummies Questions & Answers

Is there a way to completely remove an inode when the Link count is 2 ?

Currently my data is organised in a volume which has a cache directory (where all the files are first created or transferred). After that there are suitable directories on the volume which in their subdirs, contain files hardlinked to files in the cache. This is done so that the same inode... (1 Reply)
Discussion started by: abcdino
1 Replies

4. Shell Programming and Scripting

how to remove the target of the symbol link in a shell script

I have a target directory, there are some files and directories in "target_dir". I have a symbol link: my_link -> <target_dir> The target directory name is NOT known to the script (because it is varying), while the link name is always fixed. In a shell script, how to remove both the... (1 Reply)
Discussion started by: princelinux
1 Replies

5. Solaris

How to remove soft link safely

Greetings, I need some help performing a system admin function that I have been tasked with. The request seems simple enough, but my feeling is that it might be more complicated than it seems. Here is what i've been tasked with: SunOS 5.10 Generic_142900-15 sun4u sparc SUNW,SPARC-Enterprise... (3 Replies)
Discussion started by: Harleyrci
3 Replies

6. Shell Programming and Scripting

how to remove soft link

hi i have create a soft link using below command. ln -s <filename> <dirmane>where file name i use is t1 and dir name was t2. i deleted the dir t2 using command rm -rf to remove the soft link . however again i create a file a using the name t2 and when i just try to link t1 to t2 ... (1 Reply)
Discussion started by: scriptor
1 Replies

7. Red Hat

How to remove symbolic link?

this is my current code, # ln -s /lib64/ # ls -lrth total 80K -rw-r--r--. 1 root root 12K Jul 6 2012 post-install -rw-r--r--. 1 root root 552 Jul 6 2012 post-install.log -rw-------. 1 root root 1.5K Aug 21 2012 anaconda-ks.cfg drwxr-xr-x. 2 root root 4.0K Aug 21 2012 Videos... (3 Replies)
Discussion started by: jediwannabe
3 Replies

8. Shell Programming and Scripting

Get the filename linked to symbolic link

Hello guys, I have a simple problem. Do you know any way to get the get the filename linked to symbolic link? I think use "ls -l <myfile> | cut -d '>' -f2", but i know it is a bad practice take information from the output of "ls -l". I dont have "stat" comand neither. :( Regards! ... (6 Replies)
Discussion started by: Xedrox
6 Replies

9. UNIX for Beginners Questions & Answers

Bash script - Remove the 3 top level of a full path filename

Hello. Source file are in : /a/b/c/d/e/f/g/some_file Destination is : /d/e where sub-directories "f" and "g" may missing or not. After copying I want /a/b/c/d/e/f/g/file1 in /d/e/f/g/file1 On source /a is top-level directory On destination /d is top-level directory I would like... (2 Replies)
Discussion started by: jcdole
2 Replies

10. UNIX for Beginners Questions & Answers

Bash to remove find and remove specific extension

The bash below executes and does find all the .bam files in each R_2019 folder. However set -x shows that the .bam extension only gets removed from one .bam file in each folder (appears to be the last in each). Why is it not removing the extension from each (this is $SAMPLE)? Thank you :). set... (4 Replies)
Discussion started by: cmccabe
4 Replies
INSTALL-CATALOG(8)														INSTALL-CATALOG(8)

NAME
install-catalog - Manage a SGML or XML centralized catalog SYNOPSIS
install-catalog [ option ] action ... [ [ -d] [ --delegate] ] [ [ -a centralized ordinary] [ --add centralized ordinary] [ -r centralized ordinary] [ --remove centralized ordinary] [ -h] [ --help] [ -v] [ --version] ] DESCRIPTION
This shell script allows to handle a centralized catalog referencing other "ordinary" SGML or XML Open Catalogs. An Open Catalog contains a set of directives defined by OASIS, mostly used for defining equivalences between FPIs (Formal Public Identi- fiers) and real file names (see TR9401:1997 on http://www.oasis-open.org <URL:http://www.oasis-open.org>). The Open Catalogs usually reside in /usr/share/sgml. A centralized catalog is a special Open Catalog that includes only comments and CATALOG directives pointing to other catalogs (or DELEGATE directives if supported). The centralized catalog can be the key to all other SGML resources. It usually resides in /etc/sgml. The centralized catalog can be edited manually or through the install-catalog script to add or remove references to other ordinary cata- logs. This script is mainly destined to software package post-installation scripts. An example of a typical call to install-catalog is: install-catalog --add /usr/share/sgml/docbook/dsssl-stylesheets-1.54/catalog /etc/sgml/sgml-docbook-4.0.cat This call will install in /etc/sgml/sgml-docbook-4.0.cat a reference to /usr/share/sgml/docbook/dsssl-stylesheets-1.54/catalog. OPTIONS
Here is the list of options that can influence the way install-catalog works: [ [ -d] [ --delegate] ] Use DELEGATE instead of CATALOG directives to specify a pointer ACTIONS
Here is the list of actions that can be requested to install-catalog: [ [ -a centralized ordinary] [ --add centralized ordinary] ] Declare a new SGML package. [ [ -r centralized ordinary] [ --remove centralized ordinary] ] Remove a previously installed SGML package. [ [ -h] [ --help] ] Print a short help message and exit [ [ -v] [ --version] ] Print the version identifier and exit FILES
/etc/sgml/* The SGML centralized catalogs AUTHORS
Eric Bischoff <ebisch@cybercable.tm.fr> Developper of install-catalog. SEE ALSO
jw(1) conversion from DocBook to other file formats nsgmls(1) a base component of Jade DSSSL engine http://sourceware.cygnus.com/docbook-tools/ <URL:http://sourceware.cygnus.com/docbook-tools/> the home page of the DocBook tools, a compendium of all tools necessary to process DocBook files, including the SGML-common stuff. 04 August 2000 INSTALL-CATALOG(8)
All times are GMT -4. The time now is 03:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy