10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I need to print the characters in the previous line just before the regular expression match
Please have a look at the input file as attached
I need to match the regular expression ^ with the character of the previous like and also the pin numbers
and the output file should be like... (6 Replies)
Discussion started by: kshitij
6 Replies
2. UNIX for Dummies Questions & Answers
Hi All
It's me again with another huge txt files. :confused:
What I have:
- I have 33 huge txt files in a folder.
- I have thousands of line in this txt file which contain many the letter "x" in them.
- Some of them have more than one "x" character in the line.
What I want to achieve:... (8 Replies)
Discussion started by: Nexeu
8 Replies
3. Shell Programming and Scripting
I'm probably just not thinking of the correct term to search for :-) But I want to match a pattern that might be 'ABC' or '1ABC' there might be three characters, or there might be four, but if there are four, the first has to be 1 (1 Reply)
Discussion started by: jnojr
1 Replies
4. Shell Programming and Scripting
I have test string value , something like the one below
str='KUAMRJIT|GHOSH'
If I type
echo $str | grep -o -e '\|+'
it doesnt give me anything .
But on the contrary
echo $str | grep -o -e '|'
display the only one pipe character(|) thats there in the string above .
The way I understood Unix... (8 Replies)
Discussion started by: kumarjt
8 Replies
5. Shell Programming and Scripting
My input file looks like this:
13154|X,the deer hunter
13154|Y,the good life
1316|,american idol
1316|,bowling
1316|,chuck
etc...
The X, Y, or any other character (besides a comma) after the pipe is a "Device Type". I want to strip out lines that do not have a device type.
I have... (2 Replies)
Discussion started by: jwinsk
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am learning reg exp a bit :)
Meta char info:
{n,m} Matches the preceding character at least n times but not more than m times, for example, 'ba{2,3}b' will find 'baab' and 'baaab' but NOT 'bab' or 'baaaab'. Values are enclosed in braces (curly brackets).
Input file:
112
11112... (2 Replies)
Discussion started by: dragon.1431
2 Replies
7. Shell Programming and Scripting
Hi,
I wonder if its possible to do the following task using rename (perl v5.8.8).
I want to find filenames matching the specific pattern and then change chosen character of this pattern to a given character, e.g. do the following renaming:
regexp: 'ab' -----> 'a0b'
What's the simplest... (0 Replies)
Discussion started by: pms
0 Replies
8. Shell Programming and Scripting
I use SAS (a statistical software) and have to remove last character or the last 1/2 numbers that appear after characters from the string using Perl Regular Expression (which is recognized by SAS).
Input: f183ii10 f183ii2 f182ii1 f182ii2 f183iim f22ii f22ii11 f22ii12 pmh4 pmhm
Desired... (2 Replies)
Discussion started by: ospreyeagle
2 Replies
9. Shell Programming and Scripting
Hello Experts,
Can someone help me here:
I have a variable which contains a string with "".
set var1 {a}
set str1 {a is the element i want to match}
Now "regexp $var1 $str1" does not work?
("regexp {a\} $str1" works, but var1 gets it's value automatically from another script)
Is... (6 Replies)
Discussion started by: sumitgarg
6 Replies
10. UNIX for Dummies Questions & Answers
I have 2 files called stuff-egress-filter and stuff-ingress filter. There are also files called something like stuff-egress-F/0
I want to match the first two... I tried (i realize there is no filename... I'm piping this from the ls command)
grep stuff-*-filter
Finds nothing. If I... (18 Replies)
Discussion started by: earnstaf
18 Replies