Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Stripping a portion of string from behind!!! Post 302111035 by Mark Thomas on Sunday 18th of March 2007 01:51:38 PM
Old 03-18-2007
Can you use xargs?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to extract a portion of a string from the whole string

How to extract a portion of a string from a full string using unix. For example: Say source string is = "req92374923.log" I want only the numeric portion of the string say "92374923" how to do that in Unix. (2 Replies)
Discussion started by: ds_sastry
2 Replies

2. Shell Programming and Scripting

stripping leftmost characters from string

Hi there, if i have some strings ie test_324423 test_242332 test_767667 but I only want the number part (the bolded bit) how do I strip the leftmost 5 characters from the output so that i will have just 324423 242332 767667 any help would be greatly appreciated Gary (5 Replies)
Discussion started by: hcclnoodles
5 Replies

3. Shell Programming and Scripting

Stripping the spaces in a string variable

Hi , i have to strip the spaces in the string which has the following value ABC DEF i want this to appear like this ABC DEF is there any spilt method? please help.... Thanks (3 Replies)
Discussion started by: rag84dec
3 Replies

4. Shell Programming and Scripting

stripping certain characters in at the middle of a string

I am trying to strip out certain characters from a string on both (left & right) sides. For example, line=see@hear|touch, i only want to echo the "hear" part. Well i have tried this approach: line=see@hear|touch templine=${line#*@} #removed "see@" echo ${templine%%\|*} #removed... (4 Replies)
Discussion started by: mcoblefias
4 Replies

5. Shell Programming and Scripting

stripping out digits from a string with sed

i want to parse a string and only display the digits in that string... How would i accomplish this with sed command. For example. input string: " 033434343 dafasdf" output string: 03343434 Thanks (2 Replies)
Discussion started by: timmylita
2 Replies

6. Shell Programming and Scripting

Remove first portion of string

I have a script which currently uses a file containing a list of directories as an argument. The file is read in to an array, and then the array is iterated in a for loop. What I would like to do is cut off the first few directories of the directory path (they won't exist on the server where the... (5 Replies)
Discussion started by: msarro
5 Replies

7. Shell Programming and Scripting

Stripping of a symbol from string not working properly

Hi All, I used this code to strip-off $-symbol from string values. a="$980" b="897" a=`echo "$a" | sed 's/$/ /g'` b=`echo "$b" | sed 's/$/ /g'` echo "$a" echo "$b" but this results in the output: 80 and 897 it works when i use a='$987' b='890' (13 Replies)
Discussion started by: angie1234
13 Replies

8. Shell Programming and Scripting

How to extract portion of a string?

Hi Gurus, Would like to seek some help on how to extract a portion of string from log's output as shown below. Sample of raw data: piece handle=/test123/disk_dump/test123/df0_cntrl_PCPFCI20120404_68498 tag=TAG20120404T180035 comment=NONE piece... (13 Replies)
Discussion started by: superHonda123
13 Replies

9. Shell Programming and Scripting

Checking variable with specific string and stripping number from it.

I am parsing a file and I get differnt results everytime. Sometimes I get 12s sometimes I get 54m and sometime 3h.. v1=12s or v1=54m or v1=3h 12s - 12 seconds 54m - 54 minutes 3h - 3 hour I have to write a script in such a way that it whenever v1 is in minutes, I should strip "m"... (14 Replies)
Discussion started by: jayeshpatel
14 Replies

10. Shell Programming and Scripting

Get portion of string from the end

Hi all, Can anyone suggest a way to get a portion of string from the end? So: $ORACLE_SID=blt10cr1 We can drop the final '1' and end up with: $ORACLE_SID=blt10cr So far I have the following: echo $ORACLE_SID | cut -c1-5 and echo $ORACLE_SID | cut -c1-6 | rev any ideas? (4 Replies)
Discussion started by: jonnyd
4 Replies
NetApp::Filer::Version(3pm)				User Contributed Perl Documentation			       NetApp::Filer::Version(3pm)

NAME
NetApp::Filer::Version -- OO Class for representing NetApp Filer versions SYNOPSIS
use NetApp::Filer; my $filer = NetApp::Filer->new({ ... }); # The "version" is: NetApp Release 7.2.2: Sat Mar 24 20:38:59 PDT 2007 my $version = $filer->get_version; # $version->isa("NetApp::Filer::Version") print $version->get_release, " "; # prints "7.2.2" print $version->get_date, " "; # prints "Sat Mar 24 20:38:59 PDT 2007" print $version->get_string, " "; print "$version "; # Both print the same thing, the second one through operator overloading, # namely the original, unparsed version string print $version->get_version, " "; # prints "v7.2.2" DESCRIPTION
This class is used to encapsulate the NetApp Filer version string, and provide access to the components of the string as a numeric release, a perl version, and a date string. METHODS
get_release Returns the NetApp numerical release as a string, for example: 7.2.2 get_date Returns the NetApp release date as a string, for example: Sat Mar 24 20:38:59 PDT 2007 get_string Returns the unparsed version string in it's entirety: NetApp Release 7.2.2: Sat Mar 24 20:38:59 PDT 2007 get_version Returns the NetApp release as a perl version object. perl v5.14.2 2008-11-26 NetApp::Filer::Version(3pm)
All times are GMT -4. The time now is 04:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy