Alright, so this is driving me absolutely insane. I can't seem to find this ANYWHERE...
I've tried every combination and synonym I can think of for this trying to search Google.
What is the Expect/Tcl equivalent to Perl and Bash's "=~" operator, (i.e. the "contains" operator).
I'm trying to do an if statements to check if a line contains a specific string, and the only operators I could find anywhere for Expect are (==, !=, <=, >=, <, >)...
Anyone have any clue if it's possible to do a pattern match in an Expect Script's if statement?
Any thoughts would be much appreciated.
Right, sorry didn't mean to call it the contains operator, I was just trying to simplify... Shoulda said REGEX or Pattern Matching.
But anyway, I just checked out your link and I think that may be what I need. I'll give it a try and post back if it worked.
Thanks for dulling down my frustrations a bit lol...
I couldn't find a darn thing in google for Tcl or Expect that showed anything other then an exact match in an if statement or greater/less thens...
Thanks Again,
Matt
---------- Post updated at 03:41 PM ---------- Previous update was at 03:33 PM ----------
Hey Again Corona... Victory!
Thanks that worked..!
Here's what it should look like for anyone with a similar problem:
Basically it loops through the output from the previous send command, line by line.
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hi All,
I'm completely new to bash scripting and still learning my way through albeit vey slowly.
I need to know where to insert my server names', my ip address numbers through out the script alas to no avail.
I'm also searching on how to save .sh (bash shell) script properly.... (25 Replies)
Please show me how to make substitution over the contents of a file in a perl script.
In a perl script, the core part of substitution operation is
s/FINDPATTERN/REPLACEPATTERN/g;
However, I cannot figure out how to make the substitution occur over the contents of a file. The following... (3 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi
I am trying to figure out what the following line does, I work in ksh88:
] && LIST="$big $LIST"
Not sure what "-a" means in that case.
Thanks a lot for any advice -A (1 Reply)
Hi,
What is the korn shell equivalent of bash shell's "history -c" command?
I do know, how to clear the history list in ksh, I can do the following:
> ~/.sh_historybut still, I am interested to know the single one line command as 'history -c' gives error on my ksh (1 Reply)
Hi,
I have a variable, $sername, and I would like to display this variable only if it *does not* contain either of these two tags: *DTI*FA* or *DIFF*FA*.
I think the syntax for my 'or' operator is off. The variable $sername is continuously changing in an outer loop (not shown), but at the... (4 Replies)
Hi:
I am a little bit surprised to learn that there is no equivalent of "\s" (blank space) in sed.
How do you represent all types of blank in sed, including " ", "\t", "\n" etc?
Thanks. (1 Reply)
Hi,
We have a DEC Alpha 4100 Server with OSF1 Digital Unix 4.0.
Can any one tell me, if there are any commands on this Unix which are equivalent to "top" and "sar" on HP-UX or Sun Solaris ?
I am particularly interested in knowing the CPU Load, what process is running on which CPU, etc.
... (1 Reply)