10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
Let us say we have 5 log files, extract the data from all log files and save the output in a file.
home/log/first.log
home/log/second.log
home/log/third.log
home/log/four.log
home/log/five.log
I want to extract the following text from the log files and save the output in a file.... (7 Replies)
Discussion started by: ROCK_PLSQL
7 Replies
2. UNIX for Advanced & Expert Users
Hi,
I have a string with name as 20140412-s1-Potopolive_promos_20140412. So I want to extract only Potopolive string. Could you please help me the command.
O/p : Potopolive
Thx in advance (5 Replies)
Discussion started by: lkeswar
5 Replies
3. Shell Programming and Scripting
I have to extract number part (Date and timestamp part ) from the following 3 strings
AB_XYZA_20130930183017.log
AB_DY_XYZA_20130930183017.log
AB_GZU_20130930183017.log
Output should be
20130930183017
Please help me to get the string like above
Thanks (2 Replies)
Discussion started by: smile689
2 Replies
4. Shell Programming and Scripting
I have a file with 100s of lines of text. I want to perform an extraction of this line:
Info bpzs(pid=2652) using 1000 bits
I have not been able to extract it. Should I try expr match or is there another method? This line has data both in front of and in back of it. I do not have grep -o... (5 Replies)
Discussion started by: newbie2010
5 Replies
5. Shell Programming and Scripting
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)
Discussion started by: simpletech369
2 Replies
6. Shell Programming and Scripting
Hello there,
I need some help.
I have a file containing this :
$ cat file
PARM1=(VAL11),PARM2=(VAL21,VAL22,VAL23),PARM3=(VAL31),PARM4=(VAL41,VAL42)
and I need to replace all the ',' by '|' but only those which are between brackets.
Output would be :... (10 Replies)
Discussion started by: Sephiburp
10 Replies
7. Shell Programming and Scripting
Hi,
I have a string like this
BUNDLE=/home/bob/flx/user.bun
how to extract only the the last part ie, only user.bun (2 Replies)
Discussion started by: vprasads
2 Replies
8. Shell Programming and Scripting
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)
Discussion started by: dips_ag
7 Replies
9. Shell Programming and Scripting
I'm executing "wc -lc" command in a c shell script to get record count and byte counts and writing them to a file. I get the result with the full pathname of the file. But I do not want the path name to be printed in the output file. I heard that using Awk we can get this but I don't have any... (4 Replies)
Discussion started by: stakuri
4 Replies
10. Shell Programming and Scripting
Hi,
I have files that are named front1.txt to front999.txt. They are all in the same directory. To change "front" to "back", I am doing something like this.
for file in *.txt; do
new=`echo $file | sed 's/^**/back/g'`
mv $file $new
done
My problem is what if files are named... (6 Replies)
Discussion started by: csejl
6 Replies