Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Extract directory path from a parameter Post 303042856 by wtolentino on Wednesday 8th of January 2020 01:00:40 PM
Old 01-08-2020
that works thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to find the path of a file when it is passed as ....filename(parameter) to script

hi unix guru's..................:confused: question is posted in the #3 permalink shown below. (3 Replies)
Discussion started by: yahoo!
3 Replies

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

3. Shell Programming and Scripting

Extract path within path

Hi, I have a environmental variables, ORACLE_HOME=/u01/oracle/ORCL/db/tech/10.2.0 ORACLE_SID=ORCL Now I need to create a variable and need to extract some part from ORACLE_HOME. I need to get the path from ORACLE_HOME till ORACLE_SID as /u01/oracle/ORCL. I may need to check also... (6 Replies)
Discussion started by: sreejitnair123
6 Replies

4. Shell Programming and Scripting

one liner to extract path from PATH variable

Hi, Could anyone help me in writing a single line code by either using (sed, awk, perl or whatever) to extract a specific path from the PATH environment variable? for eg: suppose the PATH is being set as follows PATH=/usr/bin/:/usr/local/bin:/bin:/usr/sbin:/usr/bin/java:/usr/bin/perl3.4 ... (2 Replies)
Discussion started by: royalibrahim
2 Replies

5. Shell Programming and Scripting

How to extract and replace with parameter value?

Hi, I have a function getparam() which takes parameter name as input and parameter value as output. I have a strting like this, abcd#paramname1#efgh#paramname2#ijklmnopq Above one is my input, The strting enclosed in # are the parameter names. Here question is, I have to get the... (0 Replies)
Discussion started by: anandapani
0 Replies

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

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

9. UNIX for Beginners Questions & Answers

Convert Relative path to Absolute path, without changing directory to the file location.

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

10. UNIX for Beginners Questions & Answers

What is the difference ../directory path and ./directory path in ksh?

What is the difference ../directory path and ./directory path in ksh? (1 Reply)
Discussion started by: TestKing
1 Replies
TAP::Object(3pm)					 Perl Programmers Reference Guide					  TAP::Object(3pm)

NAME
TAP::Object - Base class that provides common functionality to all "TAP::*" modules VERSION
Version 3.23 SYNOPSIS
package TAP::Whatever; use strict; use vars qw(@ISA); use TAP::Object; @ISA = qw(TAP::Object); # new() implementation by TAP::Object sub _initialize { my ( $self, @args) = @_; # initialize your object return $self; } # ... later ... my $obj = TAP::Whatever->new(@args); DESCRIPTION
"TAP::Object" provides a default constructor and exception model for all "TAP::*" classes. Exceptions are raised using Carp. METHODS
Class Methods "new" Create a new object. Any arguments passed to "new" will be passed on to the "_initialize" method. Returns a new object. Instance Methods "_initialize" Initializes a new object. This method is a stub by default, you should override it as appropriate. Note: "new" expects you to return $self or raise an exception. See "_croak", and Carp. "_croak" Raise an exception using "croak" from Carp, eg: $self->_croak( 'why me?', 'aaarrgh!' ); May also be called as a class method. $class->_croak( 'this works too' ); "_confess" Raise an exception using "confess" from Carp, eg: $self->_confess( 'why me?', 'aaarrgh!' ); May also be called as a class method. $class->_confess( 'this works too' ); "_construct" Create a new instance of the specified class. "mk_methods" Create simple getter/setters. __PACKAGE__->mk_methods(@method_names); perl v5.16.2 2012-10-25 TAP::Object(3pm)
All times are GMT -4. The time now is 05:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy