I understand the individual pieces of the following (with one exception ..), but how does it all work as one?
Find all files like surveyresults*.txt and list them ({}=on the same line??), then take those files names that are like surveyresult[0-9] and place them in the result file.
However, my understanding of surveyresult[0-9]{14,14}, the {14,14} means that it is looking for a minimum & maximum of 14 matches of [0-9] - which will never happen, as there can be at most 10 (???)
What would this result file contents look like?
Moderator's Comments:
Please use code tags next time for your code and data.
In the subtree of reports/ in your home directory, find every file of any type named surveyresult*.txt and pile the names on an ls -l line (hope no dirs), feeding the output to a grep filter using extended regex to ensure the * was 14 digits (could say that in find) and for the winners, sort them and write to a file.
I have the string:
XXXX.YYYY_ZZZ.20180724.01.txt
I need to get rid of .txt and get full four parts
XXXX.YYYY_ZZZ.20180724.01
I did:
CTL=`echo XXXX.YYYY_ZZZ.20180724.01.txt | rev | cut -d"." -f4 | rev`
But got only YYYY_ZZZ
What should I do to get all four parts of that... (4 Replies)
I am dealing with some app log, see example below:
22:16:13.601 ClientSession(905)--Connection(5)--SELECT GETDATE()
22:16:13.632 ClientSession(158)--Connection(5)--SELECT 1
22:16:13.632 ClientSession(848)--Connection(6735)--SELECT 1 So far I needed to collect certain column from it, such as... (3 Replies)
I have number in file which contains date and serial number:
2013101000.
The last two digits are serial number (00). So maximum of serial number is 100.
After reaching 100 it becomes 00 with incrementing 10 which is day with max 31.
after reaching 31 it becomes 00 and increments 10... (31 Replies)
I want to remove the beginning and end of a filename and keep the middle.
E.g. tempblast7114_1#21110932.out_ the current filename
I want it to be called 7114_1#21 only
How would I do this?? (3 Replies)
I have a logfile from which i need to extract certain pattern based on the time but the problem here is the time is not same for all days.
Input file:
Mon 12:34:56 abvjingjgg
Mon 12:34:57 ofjhjgjhgh
.
.
.
Mon 22:30:00 kkfng
.
.
.
Mon 23:12:23 kjgsdafhkljf
.
.
.
Tue 01:04:54... (8 Replies)
Hello,
I have a XML file as below and i would like to extract all the lines between <JOB & </JOB> for every such occurance. The number of lines between them is not fixed.
Anyways to do this awk?
============
<JOB APR="1" AUG="1" DEC="1" FEB="1" JAN="1" JUL="1" JUN="1" MAR="1" MAY="1"... (3 Replies)
Hello, I'm trying to retreive certain bits of info from a file.
the file contains a list like this
info1:info2:info3:info4
info1:info2:info3:info4
info1:info2:info3:info4
info1:info2:info3:info4
how do i pick out only info2 or only info3 without the others?
Thanks (11 Replies)
Every time we build an executable the date and time are put into the file, I need to run checksum on just the working lines.(IE, no header files)
Is this even possible, if so how would I go about it?
I am using a HP-UX server any help you can give me will be greatly appreciated.
Thanks (6 Replies)