Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Extract directory from full file name? Post 302727775 by jdorn001 on Tuesday 6th of November 2012 10:59:16 PM
Old 11-06-2012
Actually, I need to know what the original code is doing, as I have to document (pseudo-code) the process. I know some basics, and can typically work out what is being done, but things like this throw me for a loop!

- Jon

PS - The authors may not have been the best coders, and if it is as simple as you indicate, then someone will modify the code!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

extract only file name from full path file name

What is the smartest way to just extract file name from a full path name. e.g. if I have /usr/sanjay/bin/file_name.c I want only file_name.c Sanjay (2 Replies)
Discussion started by: sanjay92
2 Replies

2. UNIX for Advanced & Expert Users

extract a sub directory form a tar file

anyone know if it is possable to extract a subdirectory in a tar file. IE tarfile contains parent dir -sub dir A -sub dir B I want to extract sub dir B. (2 Replies)
Discussion started by: Optimus_P
2 Replies

3. Shell Programming and Scripting

find full directory and delete old dated file?

I want to write a code that will look for a particular directory which is full or more than 95% used, and will search older file and delete it. My code looks like this: df -k|while read f1 f2 f3 f4 f5 f6 do if expr '$f5' -ge '95%' || continue then echo $f5 else echo "there is no... (2 Replies)
Discussion started by: xramm
2 Replies

4. Shell Programming and Scripting

Extract directory from a file path

Im trying to extract a directory from a path entered by the user Lets say the path is path=/home/bliss/files/myfile.txt i wanna extract "/home/bliss/files" from $path ... how can i do this? (4 Replies)
Discussion started by: mrudula009
4 Replies

5. 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

6. 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

7. Shell Programming and Scripting

extract every filename containing certain string in a directory and do some commend per file

Hi, Here is my question: suppose I have files like 1990_8xdaily_atmos.nc 1991_8xdaily_atmos.nc 1992_8xdaily_atmos.nc 1993_8xdaily_atmos.nc 1990_daily_atmos.nc 1991_daily_atmos.nc 1992_daily_atmos.nc 1993_daily_atmos.nc 1990_month_atmos.nc 1991_month_atmos.nc 1992_month_atmos.nc... (1 Reply)
Discussion started by: 1988PF
1 Replies

8. Solaris

HOW TO extract.tar file to specific directory..?

Hi all, In Solaris howto extract tar file to specific folder. This is what we do in Linux, but how to do the same thing in Solaris ? -tar -xzvf /tmp/etc.tar.bz -C /tmp (Will extract in /tmp dir) 3.gzip COMPRESSION AND EXTRACTION -tar -czvf /tmp/etc.tar.bz /etc -du ... (5 Replies)
Discussion started by: manalisharmabe
5 Replies

9. Shell Programming and Scripting

Extract a single file from a tar file to another directory

Hi, I need to extract a single file from a tar file to another directory. So far I have this: This one extract a single file to same directory: tar -xvf filename.tar ./file.txt I tried this but its not working tar -xvf filename.tar /home/dir ./file.txt or this: (6 Replies)
Discussion started by: erin00
6 Replies

10. UNIX for Dummies Questions & Answers

Extract directory name from the full directory path in UNIX using shell scripting

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)
Discussion started by: IshuGupta
5 Replies
POE::Component::IRC::Cookbook(3pm)			User Contributed Perl Documentation			POE::Component::IRC::Cookbook(3pm)

NAME
POE::Component::IRC::Cookbook - The PoCo-IRC Cookbook: Overview DESCRIPTION
POE::Component::IRC is a fully event-driven IRC client module built around POE. It can be used to write IRC client applications of any kind. This cookbook features working examples of programs demonstrating the capabilities of POE::Component::IRC. Note: This is a work in progress. The entries without hyperlinks indicate unwritten recipes. RECIPES
General Disconnecting Shows you how to disconnect gracefully. Bots A basic bot A basic bot demonstrating the basics of PoCo-IRC. Translator Add translating capabilities to your bot. Resolver Have your bot resolve DNS records for you. MegaHAL Allow your bot to talk, using artificial "intelligence". Seen Implement the "seen" feature found in many bots, which tells you when your bot last saw a particular user, and what they were doing/saying. Reload Structure your code in such a way that your bot can be reprogrammed at runtime without reconnecting to the IRC server. Feeds Use your bot as an RSS/Atom feed aggregator. Reminder Have your bot remind you about something at a later time. Messenger Have your bot deliver messages to users as soon as they become active. Eval Have your bot evaluate mathematical expressions and code. Clients Gtk2 A simple IRC client with a Gtk2 interface. ReadLine A simple IRC client with a ReadLine interface. AUTHOR
Hinrik Oern Sigur`sson, hinrik.sig@gmail.com perl v5.14.2 2011-12-07 POE::Component::IRC::Cookbook(3pm)
All times are GMT -4. The time now is 03:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy