10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi !
Before trying to write a code, is there any program or code that generates all the combinations of strings that simple awk regex can match.
By "simple regex" I mean let's say without "+", "*", and with a limited number of characters (e.g. from "1" to "5").
e.g:
input:
34?5
output:... (9 Replies)
Discussion started by: beca123456
9 Replies
2. Programming
Hi,
I am looking for regex to extract following words from text:
The word which comes after "Replaced" means
Replaced disk
Replaced floppy
Replaced memory
Please suggest the regex for it.
Thanks! (4 Replies)
Discussion started by: gunjanamit
4 Replies
3. Shell Programming and Scripting
I am trying to grep the following line in a file using a bash shell:
(..)
admin1::14959::::::
(..)
It works with the following expression (as expected)
# cat file | grep ^*::
admin1::14959::::::
but it does not work with (not expected)
# cat /etc/shadow | grep ^+::
I assume the... (2 Replies)
Discussion started by: schms
2 Replies
4. Shell Programming and Scripting
Hello,
I am trying to grep my log files for ORA errors, except ORA-00001.
I have tried:
grep 'ORA*!(-00001)' *.log
but it is not working.
Any help will be much appreciated.
Thank you. (5 Replies)
Discussion started by: drbiloukos
5 Replies
5. Programming
Hi there,
How can we use regex in perl to store the Route Distinguisher (the bold field) and also the underlined and bold lines in the below file?
Note:
These highlighted pattern is redundant through the whole input file. Basically, we just need to extract these fields at least to store them... (4 Replies)
Discussion started by: omoyne
4 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Can someone tell me why the first regular expression with the + fails to match the input string?
SUN /web>echo cat | grep '+'
SUN /web>echo cat | grep ''
cat
I'm running SunOS 5.10
Thanks.
Chris (2 Replies)
Discussion started by: che9000
2 Replies
7. Shell Programming and Scripting
Hi,
#!/usr/bin/perl -w
my $timestamp;
my $line = "Fri May 29 18:29:57.357 2009 Morocco Standard Time INFO: pid 3216 tid 1724: 170: 132192: apricocot Native Server: recvd AA_BIN_MSG_VER_CHG";
if ($line =~ /^(.*) INFO: .* recvd AA_BIN_MSG_VER_CHG/) {
$timestamp = $1;
... (1 Reply)
Discussion started by: namishtiwari
1 Replies
8. Shell Programming and Scripting
I have got a question. How to do this? I mean AND expression in regex.
List all the files in current directory that do not contain the words use AND take.
Thx.:p (15 Replies)
Discussion started by: evilfreakz
15 Replies
9. Shell Programming and Scripting
Hi,
I need to do an exact find and replace (I don't want to use regular expressions because the input comes from user). I want to find a line that matches the user's input text and replace it with an empty string.
For example, let's say the user enters I love "Unix" and the contents of the... (2 Replies)
Discussion started by: srikanths
2 Replies
10. Shell Programming and Scripting
Hi,
I am trying to do something with grep, but for some reason I just can't get it to to work.
I am looking for find a match in the second field, the length must be 10 characters and end with 'abc'.
The file is in this format:
<int><tab><field2>
I've tried a few patterns, some work,... (2 Replies)
Discussion started by: iceman
2 Replies