10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how to get string from tags using sed and grep
i try to capture the tags :
<groupId>org.test.proj.assent</groupId>
<artifactId>mainapp</artifactId>
<version>mainapp.1.4</version>
<packaging>pom</packaging>
<name>main app 1</name>
and then from there i guess i will... (7 Replies)
Discussion started by: umen
7 Replies
2. Shell Programming and Scripting
I have a file comp.pkglist which mention package version and release . In 'version change' and 'release change' line there are two versions 'old' and 'new' Version Change: --> Release Change: -->
cat comp.pkglist
Package list: nss-util-devel-3.28.4-1.el6_9.x86_64
Version Change: 3.28.4 -->... (1 Reply)
Discussion started by: Paras Pandey
1 Replies
3. Shell Programming and Scripting
Grep and Sed (replace string in patterned lines)
Hi all,
I want to grep for "PATTERN" and only if "PATTERN" is in a line, this line shall be used as replacement input e.g. for SED.
I don't get it running in one line.
NOT RUNNING - just first idea... I don't know how to redirect grep... (2 Replies)
Discussion started by: unknown7
2 Replies
4. Shell Programming and Scripting
Hello All,
I need to extract lines from a file that contains ALPHANUMERIC and the length of Alphanumeric is set to 16. I have pasted the sample of the lines from the text file that I have created.
My problem is that sometimes 16 appears in other part of the line. I'm only interested to... (14 Replies)
Discussion started by: mnassiri
14 Replies
5. Shell Programming and Scripting
Hi,
At first I want to please you to provide the solution with grep/sed if possible. :cool:
File looks like:
wished result:
so I want in a new file
BLUE@@RED
string from first line like:
grep "/folder_start" cs_src > tmp1
string from second line:
grep "/main" cs_src... (14 Replies)
Discussion started by: unknown7
14 Replies
6. Shell Programming and Scripting
Hi,
I simply try to get a string in a line but I do smth. wrong. Hopfefully you can help me ;)
tried smth like:
ggrep -Eo " /folder1/folder2/folder3/* end" get_info_file > temp.file
I played a bit around but could not specify the end string command...
So this is the... (9 Replies)
Discussion started by: unknown7
9 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
I know this question has probably been answered before, but I am struggling with this problem, even after googling a million pages.
In a file named rdmt.conf
I need a single character replaced, the number in the line below
CUR_OC4J_ID=1
It will always appear after... (3 Replies)
Discussion started by: Mike AAA
3 Replies
8. Shell Programming and Scripting
Hi,
I have a log file that I need to monitor as it's being written to, and I want to exclude certain strings from the output. At the moment I'm using ...
tail -f LogFileName_`date +%d`.log | egrep -v "First String To Exclude | 2nd string | 3rd string" ...which works OK - but now I need to... (1 Reply)
Discussion started by: jake657
1 Replies
9. Shell Programming and Scripting
Hi,
Let me explain the situation.
There are many files in a directory and its sub-directories that conatin the string pattern "pa". I want to replace all such instances with the pattern "pranavagarwal"
doing a
grep "pa" `ls`
does give me all the instances of the occurence of that... (3 Replies)
Discussion started by: pranavagarwal
3 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I'm trying to grep a string in a line using sed.
My original data looks like this:
MRTG$ grep -i "System" $file
<H1>Traffic Analysis for 15 -- sERITHC3602.t-mobile.co.uk</H1> <TABLE> <TR><TD>System:</TD> <TD>sERITHC3602 in </TD></TR> <TR><TD>Maintainer:</TD> <TD></TD></TR>... (4 Replies)
Discussion started by: viadisky
4 Replies