Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. davidbelarus

    expect script - cancatinate a string

    i got a string "A" and i want to add string "B" to end of it. This will make a full command line i can place on minicom prompt.
  2. davidbelarus

    expect script - simple proc function

    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...
  3. davidbelarus

    expect script - automation to insert \ before "

    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
  4. davidbelarus

    nested if, with a nested switch, which has another nested switch

    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...
  5. davidbelarus

    expect script - masking quotes &quot;

    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"
  6. davidbelarus

    expect script - nested if-ifelse-else

    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"...
  7. davidbelarus

    expect script - nested loop or case type statement.

    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...
  8. davidbelarus

    expect script - searching a directory

    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
  9. davidbelarus

    expect script - searching a text file

    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

Part and Inventory Search

Back
Top