10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
more jdbc.xml
<name>Fast_ds/DataSource</name>
<property>
<name>user</name>
<value>COL_USER</value>
</property>Command 1:
grep -A1 '<name>user</name>' jdbc.xml|grep -v '<name>user</name>'|sed 's/\(<value>\|<\/value>\)//g'| sed -e 's/^*//'Output:
Command 2:
grep... (5 Replies)
Discussion started by: mohtashims
5 Replies
2. Shell Programming and Scripting
Hi,
I'm writing a shell script and trying to grep a variable value, it works fine as long as there is a value in /tmp/list.out which is captured in $DSK but sometimes the file tends to be empty and that is where I'm having an issue while using grep which returns nothing. I know I can use something... (15 Replies)
Discussion started by: mbak
15 Replies
3. UNIX for Dummies Questions & Answers
HI,
I have a command to check a license file.
License_print.
In that file you get the headlines and all different licenses.
Now i want to have things extracted from it.
so i do like following:
license_print | grep -iw -e "user" -e "admin"
But i donīt want all lines where user is... (11 Replies)
Discussion started by: Tzwaj
11 Replies
4. Shell Programming and Scripting
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies
5. Shell Programming and Scripting
i have following pattern in file
s6:s2
s2:s4
s1:s2:s3:s4:s5:s6
s1
.
.
Now i want to find occurence of each record in file like s6:s2 occurs twice {once in first record and both occur in 3 record as well}
so output should be
s6:s2 2
s2:s4 2
s1:s2:s3:s4:s5:s6 :1
s1 : 2
... (7 Replies)
Discussion started by: sharad.40216
7 Replies
6. Shell Programming and Scripting
Hi im trying a GREP a varaiable which contains a file name and i search it in a list of .txt file and ifs its found the .txt file , it returns the name of the txt file name..the snippet im using is
foreach my $files (glob('*.txt'))
{
open(my $fh1, $files) or die("Unable to open '$files':... (2 Replies)
Discussion started by: rajkrishna89
2 Replies
7. Shell Programming and Scripting
I am trying to grep the oracle erros evry day from the logs file. My problem is :
-rw-r----- 1 tibcolm tibco 17438361 Apr 5 11:59 RetryService-RetryService.log
-rw-r----- 1 tibcolm tibco 245303 Apr 5 12:00 ResponseService-ResponseService.log
-rw-r----- 1 tibcolm tibco 2122654 Apr 5 12:00... (4 Replies)
Discussion started by: neeraj617
4 Replies
8. UNIX for Dummies Questions & Answers
How am I supposed to print with one Unix command the names (and only the names) of company JMT? Problems with scandinavian letters? By typing
grep JMT url | egrep --only-matching ']+'I still have company name and + marks I should get rid of.
I'd be very grateful of your help bacause I am new... (1 Reply)
Discussion started by: jht
1 Replies
9. HP-UX
I have 2 files; one file (say, details.txt) contains the details of employees and another file (say, emp.txt) has some selected employee names. I am extracting employee details from details.txt by using emp.txt and the corresponding code is:
while read line
do
emp_name=`echo $line`
grep -e... (7 Replies)
Discussion started by: arb_1984
7 Replies
10. UNIX for Dummies Questions & Answers
more Hello.txt
it was a sunny way and i was about to go home.
I need to grep and redirect to a new file all the text between 'sunny' and 'go' string above.
Note: There may be multiple lines in between the string i need to grep between. If there are multiple 'go' strings it should grep till... (9 Replies)
Discussion started by: mohtashims
9 Replies