I have 3 files as listed below and highlighted in bold the portions of the filenames I need to extract: TOS_TABIN218_20090323.200903231830 TOS_TABIN219_1_20090323.200903231830 TOS_TABIN219_2_20090323.200903231830
I tried
source_tabin_name=`echo $fname | sed 's/_[0-9].*[0-9]//'`
Don't use external commands to manipulate strings.
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)
hello,
I want to grep the log file according to time and get the portion of log from one particular time to other.
I can grep for individual lines by time but how should I print lines continuously from given start time till end till given end time.
Appreciate your ideas,
Thanks
chandra (8 Replies)
I have a very large file and each line has a pattern and it is not position specific. I need to extract the string after the pattern
****MI* is the pattern in the red color
12 digit number is the sting value in the green color and it ends with ~
e.g.
... (1 Reply)
Hi All,
I posted something similar before but I now have a another problem.
I have filenames as below
TOP_TABIN240_20090323.200903231830
TOP_TABIN235_1_20090323.200903231830
i need to extract the dates as in bold. Using bash v 3.xx
Im trying to using the print sed command but... (11 Replies)
Hi,
One of the scripts creates logs in the format:
progname_file1.log.20100312020657
where after file the number could be from 1 to 28 and after log. the date is attached in the format YYYYMMDDHHMISS
progname_file<1-28>.log.YYYYMMDDHHMISS.
Now I want to discard the .20100312020657... (7 Replies)
I am working with the ksh shell in HP UNIX and I am attempting to extract a word, beginning with a particular string and ending at the first space. for example I want to extract the word or string MS_RECENT_ACTIVITY from the following string
" This has been entered in MS_RECENT_ACTIVITY the... (2 Replies)
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)
Hi Gurus,
I need some help in extracting some of these information and massage it into the desired output as shown below.
I need to extract the last row with the header in below sample which is usually the most recent date, for example:
2012-06-01 142356 mb 519 -219406 mb 1 ... (9 Replies)
Hi,
I have the following string and I need to extract the date from it:
TextHere,2012/07/11,1
I tried using sed:
sed -n 's#^.*\({4}/{2}/{2}\).*$#\1#p'
But it doesn't return anything. The following line doesn't even return '2012':
sed -n 's/^.*\({4}\).*$/\1/p'
I used to use grep -o... (6 Replies)
Hi I have to extract the destination path information from each record the file is of variable length so I will not be able to use the print command.The search should start on variable "destinationPath" and it should end at immediate "," also the first field has to be printed
Input File:... (7 Replies)