Search Results

Search: Posts Made By: johnjs
2,369
Posted By johnjs
Segregate a number from a String in the log
Hi,

I have below lines in the log file. how to segregate and assign '3904' to a variable.

XCMM018I Return Code: 8 Feedback: 0
:&PNUM=3904:
6,531
Posted By johnjs
Thanks.. still no luck. getting below error. ...
Thanks.. still no luck. getting below error.

sed: /\(:[a-z][^:]*:\).*\1/Ip is not a recognized function.
6,531
Posted By johnjs
Thanks Don. it works. I would like to ignore...
Thanks Don. it works. I would like to ignore spaces or # as the start of a configuration. It should take as the start of the record, only if the record starts with a character/number and line ends...
6,531
Posted By johnjs
Script to find duplicate pattern in a file irrespective of case
We have a configuration file in Unix. In that we have entries like below. if it ends with ":", then it is the end of record. We need to find our if there is any duplicate entries like ABCD...
10,947
Posted By johnjs
it works
awk 'tolower($0)~tolower(s),/endpattern/' s="FIRST" file

the baove comamd works..
thanks for all your help..
10,947
Posted By johnjs
Thanks Bakunin.. Please find the sample case...
Thanks Bakunin.. Please find the sample case below. if i have a file like below

FIRST:\
one
two
three
end:

second:\
one
two
three
end:

case 1: If i gave search variable as "first"...
10,947
Posted By johnjs
Both the solutions are not working.. I tried...
Both the solutions are not working..

I tried
awk 'tolower($0) ~ /'$variable'/,/endpattern' filename
but is working only if we give the input variable in lowercase and the actual pattern in file...
10,947
Posted By johnjs
Use case insensitive variable in ksh shell scripting using sed or awk
I am using a variable called $variable in a pattern search to print from a starting variable to a constant value. the variable search should be case in sensitive.

i tired using Ip at the end in...
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 02:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy