10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Guys ,
I am having a file as stated below
File 1
sa0 -- i_core/i_core_apb/i_afe0_controller/U261/A
sa0 -- i_core/i_core_apb/i_afe0_controller/U265/Z
sa1 -- i_core/i_core_apb/i_afe0_controller/U265/A
sa1 -- i_core/i_core_apb/i_afe0_controller/U268/Z
sa1 -- ... (7 Replies)
Discussion started by: kshitij
7 Replies
2. Shell Programming and Scripting
How to use regexp to print out repetitive pattern in awk?
$ awk '{print $0, "-\t-\t-\t-\t-\t-\t-\t-\t-\t-\t-\t-"}' output:
- - - - - - - - - - - -I tried following which does not give what I want, of course.
awk '{print $0, "-\t{11}-"}'
output:
- ... (10 Replies)
Discussion started by: yifangt
10 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. Shell Programming and Scripting
Hello everyone,
I'm new in tcl scripting.
I'm currently studying a tcl script and came across this line:
regexp {(\d+)(\S?)} $opts match opt swi
According to my understanding, this line means to search in the opts variable for one or more digit, followed by a non-whitespace character... (2 Replies)
Discussion started by: mar85
2 Replies
7. Shell Programming and Scripting
Hi Experts,
I want to delete all the files in a folder other than files with .zip extension using shell script.
please suggest the code.
Neeraj Chourasiya (3 Replies)
Discussion started by: nchourasiya
3 Replies
8. Shell Programming and Scripting
Hi all Unix Gurus!
Since hours (even days :-)) I'm trying to find the correct pattern to search for IP addesses in text files.
The pattern to find a IP address itself is not too difficult:
'((||1{2}|2|2{2})\.){3,}(||1{2}|2|2{2})'
BUT, of course the above pattern is also matching lines like... (9 Replies)
Discussion started by: desertchannel
9 Replies
9. Shell Programming and Scripting
Couldn't find much help on the kind of question I've here:
There is this text file with text as:
Line one has a bingo
Line two does not have a bingo but it has a tango
Bingo is on line three
Line four has both tango and bingo
Now I would want to search for the pattern "bingo" in this file... (3 Replies)
Discussion started by: manthasirisha
3 Replies
10. 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