11-04-2009
Quote:
Originally Posted by
ahmad.diab
One more thing ..can you please recommend to me some books related to TCL & TK
I'm quite new to
TCL too. I want to learn the language because of
expect, which seems very interesting to me.
I purchased
Exploring Expect on
amazon and there is a quick
TCL tutorial at the beginning of the book.
You could even consult it online on
Google books.
I should add that the
TCL group on
USENET (
comp.lang.tcl) is also a great resource.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Need to extract a string from one file and search the same in other files.
Ex:
I have file1 of hundred lines with no delimiters not even space.
I have 3 more files.
I should get 1 to 10 characters say substring from each line of file1 and search that string in rest of the files and get... (1 Reply)
Discussion started by: mohancrr
1 Replies
2. Shell Programming and Scripting
Suppose pwd=/home/user/work/wip1
How to output the "pwd string" into 5 chunks?
/home/user/work/wip1
/home/user/work
/home/user
/home
/
:confused: (1 Reply)
Discussion started by: jehrome_rando
1 Replies
3. Shell Programming and Scripting
Hi All,
I am executing a Tcl script and i am trying to get the user input while they execute the script at start itself like
>>filename.tcl USERINPUT
and then i will take this userinput inside the the tcl assign it to some variable for further manipulation/processing ...... can anyone pls... (1 Reply)
Discussion started by: sukrish
1 Replies
4. Shell Programming and Scripting
Anyone knows how to set variable in TCL ?
let say i have a password variable and it will have different values.
set variable
and variable has different values like:
xxxx
yyyy
zzzz (0 Replies)
Discussion started by: linuxgeek
0 Replies
5. Shell Programming and Scripting
Hi all,
I have some data in the form of
adc|nvhs|nahssn|njadnk|nkfds
in the above data i need to write a script so thet it will append "|||" to the third occurnace in the string ..... the outout should look like
adc|nvhs|nahssn||||njadnk|nkfds
Thanks,
Firestar. (6 Replies)
Discussion started by: firestar
6 Replies
6. Shell Programming and Scripting
Hello,
I will be sending this command to a specific COMID:
exp_send-i $COMID "fdisk -l | grep Disk | awk '{print $2}'"
The command will produce this output:
/dev/sda
/dev/sdb
etc..
the problem is how do I store the output in a variable in TCL,
I am currently using this to grab the... (1 Reply)
Discussion started by: h0ujun
1 Replies
7. Shell Programming and Scripting
Need help with a a tcl code. Need to find out the ip address from a URL if it is present to do some activity.
The URLs will be of the form
<domain>?a=12345&d=somestring1(Note: c not present)
<domain>?c=10.10.10.100&d=somestring1
<domain>?a=12345&b=somestring1&c=10.1.2.4&d=somestring2... (1 Reply)
Discussion started by: ampak
1 Replies
8. Shell Programming and Scripting
The username is of the format : 123456789110000-1234@something.com
With this below TCL procedure, I am trying add first and Sec Id and get third Id.
I checked in online compiler and it seems to work and add. However, when I am running this in my lab, I get error as "integer value too large to... (1 Reply)
Discussion started by: Shaibal_bp
1 Replies
9. Shell Programming and Scripting
The username is of the format : 123456789110000-1234@something.com
With this below TCL procedure, I am trying add first and Sec Id and get third Id.
I checked in online compiler and it seems to work and add. However, when I am running this in my lab, I get error as "integer value too large to... (3 Replies)
Discussion started by: Shaibal_bp
3 Replies
10. Shell Programming and Scripting
Hi,
Below is the command I use to search for IP address in a file.
find ./ -type f \( -name "*.txt" -or -name "*.xml" \) | xargs grep -oE "\b({1,3}\.){3}{1,3}\b"As an output I found three IP address and below is how they look.
#Listen 112.34.56.58:80
Listen 112.134.56.58:80 #This is an... (7 Replies)
Discussion started by: mohtashims
7 Replies
LEARN ABOUT DEBIAN
dislocate
DISLOCATE(1) General Commands Manual DISLOCATE(1)
NAME
Dislocate - disconnect and reconnect processes
SYNOPSIS
dislocate [ program args... ]
INTRODUCTION
Dislocate allows processes to be disconnected and reconnected to the terminal. Possible uses:
o You can disconnect a process from a terminal at work and reconnect from home, to continue working.
o After having your line be dropped due to noise, you can get back to your process without having to restart it from scratch.
o If you have a problem that you would like to show someone, you can set up the scenario at your own terminal, disconnect, walk
down the hall, and reconnect on another terminal.
o If you are in the middle of a great game (or whatever) that does not allow you to save, and someone else kicks you off the ter-
minal, you can disconnect, and reconnect later.
USAGE
When run with no arguments, Dislocate tells you about your disconnected processes and lets you reconnect to one. Otherwise, Dislocate runs
the named program along with any arguments.
By default, ^] is an escape that lets you talk to Dislocate itself. At that point, you can disconnect (by pressing ^D) or suspend Dislo-
cate (by pressing ^Z).
Any Tcl or Expect command is also acceptable at this point. For example, to insert the contents of a the file /etc/motd as if you had
typed it, say:
send -i $out [exec cat /etc/motd]
To send the numbers 1 to 100 in response to the prompt "next #", say:
for {set i 0} {$i<100} {incr i} {
expect -i $in "next #"
send -i $out "$i
"
}
Scripts can also be prepared and sourced in so that you don't have to type them on the spot.
Dislocate is actually just a simple Expect script. Feel free to make it do what you want it to do or just use Expect directly, without
going through Dislocate. Dislocate understands a few special arguments. These should appear before any program name. Each should be sep-
arated by whitespace. If the arguments themselves takes arguments, these should also be separated by whitespace.
The -escape flag sets the escape to whatever follows. The default escape is ^].
CAVEATS
This program was written by the author as an exercise to show that communicating with disconnected processes is easy. There are many fea-
tures that could be added, but that is not the intent of this program.
SEE ALSO
Tcl(3), libexpect(3)
"Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs" by Don Libes, O'Reilly and Associates, January 1995.
AUTHOR
Don Libes, National Institute of Standards and Technology
7 October 1993 DISLOCATE(1)