I have a text file that has links in it.
I can write a match for sed to replace the link with anything.
For example:
http://www.google.com
becomes
XxX
But what I'm after is not to replace the link with something but to remove everything else and just leave the link. I want a... (5 Replies)
Hi Every one
I have a file in the following manner...
AAAAAA*PERFORM WRITEQ
BBDFDD*PERFOMF WRITEQ
FFFF *PERFOMF WRITEQ
i want to find the lines which donot have * in 7th position..
I have tried this but some problem i think...
grep '......*WRITEQ' INpFIle...
any 6 chars not... (7 Replies)
Here is my script so far:
set dirs = ` find . -name "message.jar" 2> /dev/null | cut -d "/" -f 2 ` | uniq
foreach dir ( $dirs )
if (grep $dir/* someText==null) --> how do I write this in script?
print $dir
end
end (4 Replies)
I working fine with following statement -
sed '/search_pattern/ s/pattern1/pattern2/' file_name
requirement changes , now i want negate the search something like -
sed '! /search_pattern/ s/pattern1/pattern2/' file_name (this doesn't work)
anybody can plz tell the correct syntax... (2 Replies)
Hi,
I am using the under-noted script to search the "MYPATTERN" in MYFILE and print that block of lines containing the pattern starting with HEADER upto FOOTER.
Please help me what to put in script to negate the search i.e. not to print those blocks meeting the search criteria.
gawk -v... (1 Reply)
Hi guys,
as per subject I am having problem with regular expressions.
Example, if i got a string "javax.servlet.http.HttpServlet.service" that may occurred anywhere within a text file.
How can I used the negate pattern matching of regular expression?
I tried the below pattern but it... (4 Replies)
Hi All...
I have a script that checks for any problems(particularly looks for 'Needs Maintenance') with metadevices and alerts accordingly. This was not configured to alert for a particular metadevice. Now i want to negate alerting for a particular metadevice(say d40). Is this possible? I am... (6 Replies)
Hello,
I have a situation where I am trying to use Apache's RedirectMatch directive to redirect all users to a HTTPS URL except a single (Linux) user accessing there own webspace. I have found a piece of regular expression code that negates the username:
^((?!andy).)*$but when I try using it... (0 Replies)
Example:
I have data like,
H|1|2|#||4|4|5|6
D|f|g|h|j|j|k|k|
D|f|g|h|j|j|k|k|
D|f|g|h|j|j|k|k|
D|f|g|h|j|j|k|k|
D|f|g|h|j|j|k|k|
T|g|g|G|G|g|g|
T|g|g|G|G|g|g|
I have to write command, it should delete all the lines except line starting with "D".
I have tried sed '/^\(D\)|/!d'... (2 Replies)
Hi All,
New to this forum (and yes , a newbie in programming..:p)
I have a decimal to binary converter script done this way :
i=$1
bit0=$(( (i & 0x01) > 0 ))
bit1=$(( (i & 0x02) > 0 ))
bit2=$(( (i & 0x04) > 0 ))
bit3=$(( (i & 0x08) > 0 ))
bit4=$((... (6 Replies)