Gentlemen
i am converting my code to use proc and as proof of concept making basic proc functions:
this code gives this error: wrong # args: should be "printer a b c"
while executing
"printer { $brand $version $name }"
+++++code+++++
#!/usr/bin/expect -f
set brand 100
set version 1200...
questions.
one of the lines that i pull has special characters, the ".
i know to mask them i precede them with a \.
how do i write script to pull the string in, insert \ in front of " it sees.
david
basically
if
switch
switch
this is the code and the errors i am getting.
code
+++++++++++++++++++++++++++++++++++++++++++++
set brand 100
set version 1200
set name "hr20"
puts "Version is $version\n"
if {$version <1300} {
#standard...
Gentlemen
I have strings with special characters in them " to be exact.
how do i get the string to record correctly at a "set" "send" "put" statment
#this did not work, the quotes screwed it up.
set bootline "boot -elf -z $tftpserver:machine1-pac.initrd "root=/dev/ram0 rootfs=xxx calmem=88m"
I got an interesting result here.
the nested if worked fine when i put numbers in. when i put a letter in, i expected it to go to the else(non-standard case i presumed) for some reason it went to the ifelse statement.
#!/usr/bin/expect -f
set version "x"
send "Version is $version\n"...
i need to do a classic case statement, i wanted some suggestions of how to implement it.
my pseudocode is like this:
if version is 1200 or below, then
{
machine1, use this line
machine2, use this line
machine3, use this line
... 6 unique machines like that.
}
else
#if buld is more...
gentlemen, a similar question.
i need to locate a file with specific attributes. [name, version, extension and not "debug"] string in its name. The name version and extension i have in separate strings inputted by the user.
i am working with find command rightnow.
have a nice day
david
hello gentlemen.
i need to search a txt file, and once i find a particular string, extract something that starts with a word "root", and ends about 50 characters later with "grmem" (bootline for an stb)
text file has a term"fake boot" and shortly after it i anticipate to find the root and grmem
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.