May I doubt that making a problem "very urgent" (although this is highly deprecated here!), bumping it up as well, and then not coming back for a week should be considered good style?
difftime(starttime, endtime) - function takes two times in format "hh:mm:ss" and returns "(Y seconds)" where Y is the number of seconds endtime is ahead of starttime.
Matches lines that contain "Task: " eg: [YYYY-MM-DD 03:04:58] Standard Output for '/Task: CIE':
T is assigned to last field of line ("CIE':" for example)
gsub() call replaces ' and : chars with nothing in T (giving "CIE").
Note as the awk program was quoted with ' we have to close the quoted string then escape a single ' with '\ and then start a new quoted string, hence '\'' is required to get a single ' in the code.
Matches line containing "Phase " followed by "started" eg: TL[T] build an array TL[] with all task strings TS[T, $5] build a 2 dimensional array TS with Task,phase# as the index and time as the value
build a 2nd 2 dimensional array TE with Task,phase# as index and as the index and time as the value
After the file has been passed go through each task stored in the TL array
for(phase=0; (task SUBSEP phase) in TS; phase++)
starting with phase=0 loop while a phase exists in the TS[] (task start) array for our current task, increment the phase number at the end of each loop.
if their is an entry in TE[] (task end) for this task,phase then print start and end time and call difftime() to display seconds.
otherwise display start time and "Unfinished"
This User Gave Thanks to Chubler_XL For This Post:
This is the command output need to be matched:
Telnet console listening to port 42365.
(the port number changes every time)
Code to test it:
=======================================
#!/tools/AGRtools/bin/expect
exp_internal 1
set timeout 10
spawn bash
set bashId $spawn_id
... (4 Replies)
Hi all!
Thanks for taking the time to view this!
I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern.
Example:
Drink a soda
Eat a banana
Eat multiple bananas
Drink an apple juice
Eat an apple
Eat multiple apples
I... (8 Replies)
The sample file:
dept1: user1,user2,user3
dept2: user4,user5,user6
dept3: user7,user8,user9
I want to match by '/^dept2.*/' but don't want to have substring 'dept2:' in output. How to compose such regex? (8 Replies)
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Hi,
I am trying to get a result out of this but fails please help. Have two files /tmp/1 & /tmp/hosts.
/tmp/1
IP=123.456.789.01
WAS_HOSTNAME=abcdefgh.was.tb.dsdc
/tmp/hosts
123.456.789.01
I want this result in /tmp/hosts if hostname is already there dont want duplicate entry.
... (5 Replies)
Hi friends,
I have a some files in a directory. for example
856-abc
856-def
851-abc
945-def
956-abc
852-abc
i want to display only those files whose name starts with 856* 945* and 851* using a single pattern.
i.e
856-abc
856-def
851-abc
945-def
the rest of the two files... (2 Replies)
I have a certain mnemonic string from which I want to calculate a number
The pattern follows three letters s, v and d. If a letter is by its own, the number assigned to the letter is assumed to be one. Else it takes the value preceeding it. I then need to add the numbers together.
Example
... (5 Replies)
All,
I have the following file:
--------------------------------------
#
# /etc/pam.d/common-password - password-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define the services... (2 Replies)
Hi all,
I'm looking for some help. I have a file (very long) that is organized like below:
>Cluster 0
0 283nt, >01_FRYJ6ZM12HMXZS... at +/99%
1 279nt, >01_FRYJ6ZM12HN12A... at +/99%
2 281nt, >01_FRYJ6ZM12HM4TS... at +/99%
3 283nt, >01_FRYJ6ZM12HM946... at +/99%
4 279nt,... (4 Replies)
Hi,
I have file 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433... (4 Replies)