I'm not real familiar with sed, but I need to capture the year this directory path. Here's what I have so far. I'm able to capture the run name, but I want the only the year that's within the run name. How can I do this?
Thanks
-J
If you're using a shell that performs parameter expansions required by the POSIX standards, there are ways to do this entirely in the shell without invoking sed twice. For example:
which produces the output:
If it isn't obvious, the match against the letters "y", "h", "l", "e", "t", and "r" is a search for the last letter in an English month name. You could also use:
to get the same results. Of the two, I chose the one requiring less typing.
Hi, I'm a newbie to sed and learning about sed 1 liners and captures. I was wondering if someone could help me with the code below:
http://i51.tinypic.com/2eg4kdd.png
So that's taking a URL and splitting it into URL,TLD & Filename. Any help on how I can do this is much appreciated.
... (6 Replies)
I am trying to retrieve that max 'year' in a text file that is delimited by tilde (~). It is the second column and the values may be in Char format (double quoted) and have duplicate values.
Please help. (4 Replies)
Hi Guys, I'm trying to identify the last logins by all the users in the system in AIX. the last command gives me the output, but there is no year displayed for it . Since there is a duplication of months i mean Apr 2010 and Apr 2009 also its giving me inaccurate data.. Is there a way I can filter... (4 Replies)
Hi guys,
I have been trying to play with sed to accomplish this but I just can't quite get it right.
I need to be able to remove the year from a string held in a variable in my bash script.
The string may have multiple words but always ends with a year such as (2009)
for example:
... (2 Replies)