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 Beginners Questions & Answers
Hi
I am writing a TCL script to delete a certain in a file
My Input file
module bist_logic_inst(a, ab , dhd, dhdh , djdj, hdh, djjd, jdj, dhd, dhp, dk
);
input a;
input ab;
input dhd;
input djdj;
input dhd;
output hdh;
output djjd;
output jdj;
output dk; (1 Reply)
Discussion started by: kshitij
1 Replies
3. Shell Programming and Scripting
In a tcl script I need to find a way of reading a file, and looking for a phrase ("set myvariable") and putting the word following that into a variable.
I've used a file open, and a while loop with gets to read each line from the file into a variable, and using regexp searched for the item. I'm... (1 Reply)
Discussion started by: Tonyb61
1 Replies
4. Shell Programming and Scripting
I need to change R3.1.5 as 03015
similarly R4.1.7 as 04017
i need a single command
in tcl pls help
---------- Post updated at 05:19 PM ---------- Previous update was at 04:48 PM ----------
i had to do like this without using regexp
set old_release "R3.1.5"
... (1 Reply)
Discussion started by: Syed Imran
1 Replies
5. Shell Programming and Scripting
I need some help with regexp in tcl. The following code does work if the $urlvar ends in jpg,jpeg,png or gif. Eg, protocol(http/https)://testsite.com/images/image1.jpg
if { ! } {
//Do something
}
My problem is that if the URL does not end in these extensions this regexp is of no... (1 Reply)
Discussion started by: ampak
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I'm curious about how to do a very simple thing with regular expressions that I'm unable to figure out.
If I want to find out if a string contains 'a' AND 'b' AND 'c' it can be very easily done with grep:
echo $STRING|grep a|grep b|grep c
but, how would you do that in a single... (9 Replies)
Discussion started by: jimcanoa
9 Replies
7. Shell Programming and Scripting
Hi. Here's a tricky one (at least to me):
I have a file named theFile.txt (UTF-8) that contains the following:
a
b
cWhen I execute
perl -pe 's|a.*c|d|sg' theFile.txtin bash 3.2 on MAC OS X 10.6, I get no match, i.e. the result is
a
b
cagain. Any clues why? (2 Replies)
Discussion started by: BatManWSL
2 Replies
8. 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
9. Shell Programming and Scripting
or I don't know how to make it work ...
Hello
im trying to build regexp that will match me single string or function call inside of brackets
for example I have :
<% myFunction("blah",foo) %>
or
<% myVar %>
and not match :
<% if(myFunction("blah",foo)==1) %>
or
<% while(myvar < 3){... (2 Replies)
Discussion started by: umen
2 Replies
10. Shell Programming and Scripting
Hi guys,
does anyone know how to test for a regular expression - i want to include it in a script to make sure the variable is a regexp
cheers (3 Replies)
Discussion started by: penfold
3 Replies