Sponsored Content
Top Forums Shell Programming and Scripting splitting up of absolute filepath Post 302102261 by DILEEP410 on Tuesday 9th of January 2007 09:06:39 AM
Old 01-09-2007
splitting up of absolute filepath

Hi,

I am using the bash shell on suse.I need to split the absolute file path
into filename and directory path.

eg: /cas/43fg/temp/sample.txt

i want to split the above into
sample.txt(file) and /cas/43fg/temp(directory path)

I want to do this by using shell commands.Would anyone help ?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Length of a Unix filepath max length

Hi Guys, Could anyone shed some light on the length of a Unix filepath max length pls ? thanks ! Wilson (3 Replies)
Discussion started by: wilsontan
3 Replies

2. Shell Programming and Scripting

Absolute value

Is there a function in awk to get the absolute value of a-b which can be negative or positive, I just care for the absolute value... (5 Replies)
Discussion started by: placroix1
5 Replies

3. Shell Programming and Scripting

tar: extract single file to different filepath

Hi, This is my first post here - I'm hoping I can get some help! I have searched these forums and othersand not getting anything that works. I am trying to extract a single file from a tar archive to a diffierent location than it will default to. For example my tar log shows me ... a... (3 Replies)
Discussion started by: littleIdiot
3 Replies

4. UNIX for Dummies Questions & Answers

absolute value

is there any function in unix which will convert a integer to absolute value with a single decimal point. suppose x=15232 y=x/1024=14.875 i want y to be 14.8 Similarly if y=6.29452 it should come as 6.3 (3 Replies)
Discussion started by: dr46014
3 Replies

5. Shell Programming and Scripting

Grab a number at end of filepath

Hello, I have a file path such as: /path/to/whatever/30 and I want to get the number off the end. My problem is that there might be other numbers in the path and the last number can be 1 or 2 digits. I tried something like: sed 's/.*\(\/\{1,2\}\).*/\1/' which seems to work fine for single digit... (7 Replies)
Discussion started by: phreezr
7 Replies

6. Shell Programming and Scripting

Problem while using grep (multi-level) with the space-separated filepath.

Hi, I've been trying to use grep to find out all the files which have two particular patterns in it (both pattern1 AND pattern2). I have a script to do the same, in which I'm getting the output of the first grep (with -l option) which contains the list of file paths and I'm trying to search for... (3 Replies)
Discussion started by: NanJ
3 Replies

7. Solaris

How to get the filepath and filenames in pfiles PID command?

Hi, When I use pfiles PID, it displays the below output and i just see the inode, can i able to get the full path and file name? pl help me on this. Current rlimit: 8192 file descriptors 0: S_IFCHR mode:0620 dev:308,0 ino:12582968 uid:1001378434 gid:7 rdev:24,26 O_RDWR ... (3 Replies)
Discussion started by: balamv
3 Replies

8. Shell Programming and Scripting

How to add filepath to filename when moving it?

Hi I have a cron job setup that searches for 'core dump' files in a fixed set of directories and moves the core files to a separate file system. I am able to add date and time info to the file name. How can I add the source directory path to the file name? In case anyone is wondering why I... (5 Replies)
Discussion started by: dexter126
5 Replies

9. UNIX for Beginners Questions & Answers

Copy filepath along with filename at end of another file

Hi , Please help me out for the below problem - I have 2 files in a directory - $ ls -ltr total 4 -rwx------+ 1 abc Domain Users 615 May 31 17:33 abc.txt -rwx------+ 1 abc Domain Users 0 May 31 17:33 ll.sh I want to write the filename of abc.txt along with the directory to the... (2 Replies)
Discussion started by: Pratik4891
2 Replies

10. Shell Programming and Scripting

Extract filepath names between two strings

OS : Fedora Linux 26 Shell : bash I have a file with around 5000 lines like below. file /usr/share/icons/Papirus/16x16/actions/papirus-icon-theme-20180501-1.noarch conflicts with file ... file /usr/share/icons/Papirus/16x16/actions/align-horizontal-left-to-anchor.svg conflicts between... (7 Replies)
Discussion started by: John K
7 Replies
CAS(1)								  aMule utilities							    CAS(1)

NAME
cas - c aMule statistics SYNOPSIS
cas [-o] [-p] [-c <path>] cas [-h] DESCRIPTION
cas is a program for displaying the contents of your aMule online signature file to console (in a human readable form). For this to work, you must enable the "Online Signature" option in aMule's preferences. [ -o, --picture, -P ] Writes the online signature picture. You can optionally append =<PATH> to this option, to specify the location it should be written to. [ -p, --html, -H ] HTML page with stats and picture. You can optionally append =<PATH> to this option, to specify the location it should be written to. [ -c <path>, --config-dir=<path> ] Read config from <path> instead of home [ -h, --help ] Prints a short usage description. Without any options, it prints online signature data to stdout. cas was written by Pedro de Oliveira <falso@rdk.homeip.net> FILES
~/.aMule/casrc stat.png tmp.html REPORTING BUGS
Please report bugs either on our forum (http://forum.amule.org/), or in our bugtracker (http://bugs.amule.org/). Please do not report bugs in e-mail, neither to our mailing list nor directly to any team member. COPYRIGHT
aMule and all of its related utilities are distributed under the GNU General Public License. SEE ALSO
amule(1), wxcas(1) AUTHOR
This manpage was written by Vollstrecker <amule@vollstreckernet.de> cas v0.8 November 2011 CAS(1)
All times are GMT -4. The time now is 11:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy