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 strongm 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: *

  • Users: RF101
  • Order by date
  1. RF101

    Passing Text from a File into Expect Script

    You are awesome! I was just experimenting with a line just like this that I found on another site. It works! I also had to make sure my text file used a space delimiter versus a tab. Thanks for all your help.
  2. RF101

    Passing Text from a File into Expect Script

    Thanks for your help. I think you are very close to figuring it out. Here is what I am getting for output: file.list: 123.123.123.123 1000 123.123.123.124 1001 # for IList in `cat file.list | awk '{print $0}'`; do > echo "$IList"; > done 123.123.123.123 1000 123.123.123.124 1001 Here...
  3. RF101

    Passing Text from a File into Expect Script

    My List has 2 fields: IP 4DigitNumber for IList in `cat <ip file>.list | awk '{print $1, $2}'`; echo "$IList"; = Only 4DigitNumber without IP
  4. RF101

    Passing Text from a File into Expect Script

    This is close. I need to assign the IP and 1234 to the same string. ./runme.exp IP 1234 Currently it is sending IP and then 1234 in the 2nd loop
  5. RF101

    Passing Text from a File into Expect Script

    I have a file with a list of IPs and a 2nd field: x.x.x.x | 1234 I have an Expect script that requires input: ./runme.exp x.x.x.x 1234 I would like to read the file and use it in the script so I could run the script on multiple servers in a row.
  6. RF101

    Looping Through Windows Drive Locations

    I am a hack when it comes to Perl. I figured I could get rid of all of the LWP, url and browser references. Is there another module that would help with windows file access? I am trying to replace the $url with a file directory location. Is there a way I can replace the following: my...
  7. RF101

    Looping Through Windows Drive Locations

    All, In the past I had a bunch of csv or text files sitting on a web server. My script would loop through all of the folders on the web server and pull out the parts of the files that I wanted. Recently these files have been moved from the web server to a shared drive that I do not control. I...
  8. RF101

    Expect Scripting - Remove Clear Screen

    I found a solution for this problem. I ended up using a sed regular expression to remove all of the special characters and create a new cleaned file. RF
  9. RF101

    Remove Non_ascii Characters

    Does anyone know the way to call this from withing Expect? Expect seems to choke on the ^w\. and does not continue. I have tried set content [regsub -all {[^\w\.]} $newName "" newName ] but this does not work either. Thanks, JB
  10. RF101

    Remove Non_ascii Characters

    As you can see from my recent posts I am new to Expect I have everything working close to the way I want it now for my data collection. I just a have a couple small issues. 1. The script below adds a non-ascii character to the end of the file name. Is there a better way to do this? set tdate...
  11. RF101

    Expect Scripting - Remove Clear Screen

    I have redirected the output from my telnet session to a text file. The text file contains ANSI characters that I do not want, example: Erase from cursor to end of screen \027[J or \027[0J  Is there a way to suppress these characters so that they do not show up in the output file?
  12. RF101

    Placing Expect command inside an existing Expect

    Resolved. I decided to place everything in one script instead of trying to call a second one within the first. Thanks, RF
  13. RF101

    Creating a Date named file with Expect

    Resolved. I decided to place everything in one script instead of trying to call a second one within the first. Thanks, RF
  14. RF101

    Placing Expect command inside an existing Expect

    Current script: set tdate [clock format [clock seconds] -format %Y%m%d] set newName ofcvar_ append newName $tdate append newName ".txt" send "expect -f ofcvar.txt > $newName\r" This gives me a new file like ofcvar_20080919.txt When I type in the commands above at the expect prompt it works...
  15. RF101

    Creating a Date named file with Expect

    This is awesome. Thanks for your help. One more question. When I type in the commands above at the expect prompt it works exactly like I wanted it but when I type the commands into a new tcl file and execute it it fails to send the last command successfully. set tdate [clock format [clock...
  16. RF101

    Creating a Date named file with Expect

    Thanks for the quick response. If ofcvar.txt is my command reference for the expect script and I add this line of code within the file how would I call it to create the file name with the date? My current ofcvar.txt file contents, simple I know: set username xxx set pass xxx set host xxx.com...
  17. RF101

    Creating a Date named file with Expect

    Hello, I am new to TCL and Expect. I wrote an Expect script that pulls the data that I want but I would like to pull it every day and automatically assign the days date as part of the file name. I tried playing around with exec data but I could not get teh syntax down. my current code: #...
  18. RF101

    Import Vertical Text records into Excel?

    Awesome! I didn't even see that line for some reason. This will make my life so easy. I can't thank you enough. Notes for people searching with the same issue: vertical records, Motorola, text reports, transpose, import RF101
  19. RF101

    Import Vertical Text records into Excel?

    Sorry. i meant the rest of the fields in the record. Why is it only grabbing the first 3?
  20. RF101

    Import Vertical Text records into Excel?

    "unpack", This is what I needed. Thank you very much for this contribution. When I run the script above I get the following output: 03/06/2008 08:00 19.0 03/06/2008 08:00 19.0 03/06/2008 08:00 19.0 03/06/2008 08:00 19.0 This is correct. This is the first three fields for each record...

Part and Inventory Search

Back
Top