01-31-2008
I use Ksh and I have tried it in the following applications that connects to Unix.
1) Putty 2) Attachmate Reflection 3) HummingBird 4) MSDoS (cmd) using telnet
Above application, I have seen the same behavior. Probably its not application. Its something with Shell
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
When I login to a specific machine (running Solaris 2.8; actually serveral machines behave this way), with a known good account, I don't get any shell prompt, and no screen responses to various commands such as ID and PWD. Any ideas on what is causing this, and how to change this behavior? (2 Replies)
Discussion started by: Mufasa
2 Replies
2. UNIX for Dummies Questions & Answers
Hi, I´m using SCO Unix 5.0.5 and I want to configure de variable PS1, so when I type the command:
cd /etc/
the prompt shows
/etc/_>
Is that possible with sh shell? I´ll appreciate your help.
Thanks, a Happy New Year! (1 Reply)
Discussion started by: diegoe
1 Replies
3. UNIX for Dummies Questions & Answers
currently, I set my prompt in my .cshrc file as:
set prompt = "%B%h %m %P %/ \n% "
I have to use certain shells for some specific tasks and would like to set different prompts depending on the type of shell that I am using. Any advice?
Thanks (3 Replies)
Discussion started by: dranNfly
3 Replies
4. UNIX for Dummies Questions & Answers
Does anyone of you know how to turn off color and weird characters on bash shell when using the command "script"? Everytime users on my server used that command to record their script, they either couldn't print it because lp kept giving the "unknown format character" messages or the print paper... (1 Reply)
Discussion started by: Micz
1 Replies
5. Shell Programming and Scripting
Hi,
I want to change the shell prompt, using the cd command.
I have a shell prompt like this -
p78-mfx(dgaw1078/9781)$
Now i do this -
p78-mfx(dgaw1078/9781)$ cd log4j
here the shell prompt should change like this -
p78-mfx(dgaw1078/9781)log4j$ (6 Replies)
Discussion started by: arunkumarmc
6 Replies
6. AIX
here is the one of the scripts:
script1.kshfunction haha
{
print "calling haha"
exit
}
script2.ksh. script1.ksh
haha | tee -a /dev/null
print "i am script 2"
after launching the script2, the result:
---------------------------------------------
calling haha
i am script 2
... (6 Replies)
Discussion started by: getter
6 Replies
7. Shell Programming and Scripting
sqlLogftp_mov=$LOGDIR/logftp_mov_$mydate.log
sqlplus -s $ORAUSER << EOF > $sqlLogftp_mov
SET SERVEROUT ON
@/$SCRIPTDIR/rep_comm_ext_tbl_load.sql
EOF
retorno=0
cnt=`grep -q 'ORA-' $sqlLogftp_mov | wc -l`
if ;
then
retorno=1
echo 'Failure'
sendEmailFalha
exit 1
fi
if ;
then
echo... (8 Replies)
Discussion started by: shyamaladevi
8 Replies
8. Shell Programming and Scripting
I just finish the shell script .
This shell can replace weird characters (such as #$%^@!'"...) in file or directory name by "_"
I spent long time on replacing apostrophe in file/directory name
added: 2012-03-14
the 124th line (/usr/bin/perl -i -e "s#\'#\\'#g" /tmp/rpdir_level$i.tmp) is... (5 Replies)
Discussion started by: begonia
5 Replies
9. Shell Programming and Scripting
I have a script named check which will read the content of a file and check wether those files exist in the current directory. If so it will have the exit status of 0, otherwise it will have 1.
check script:
#!/bin/bash
if ; then #Check there is enough command line parameters.
exit 1... (2 Replies)
Discussion started by: Ray Sun
2 Replies
10. AIX
Dear all experts,
I have a script written to compress a list of files, during compressing, some of the files are having same name. When the compressing started, the same name file will be prompted with message whether to overwrite the old file. I need to enter "y" to continue.
Is there any way I... (7 Replies)
Discussion started by: kwliew999
7 Replies
send(n) Tk Built-In Commands send(n)
__________________________________________________________________________________________________________________________________________________
NAME
send - Execute a command in a different application
SYNOPSIS
send ?options? app cmd ?arg arg ...?
_________________________________________________________________
DESCRIPTION
This command arranges for cmd (and args) to be executed in the application named by app. It returns the result or error from that command
execution. App may be the name of any application whose main window is on the display containing the sender's main window; it need not be
within the same process. If no arg arguments are present, then the command to be executed is contained entirely within the cmd argument.
If one or more args are present, they are concatenated to form the command to be executed, just as for the eval command.
If the initial arguments of the command begin with "-" they are treated as options. The following options are currently defined:
-async Requests asynchronous invocation. In this case the send command will complete immediately without waiting for cmd to complete in
the target application; no result will be available and errors in the sent command will be ignored. If the target application is
in the same process as the sending application then the -async option is ignored.
-displayof pathName
Specifies that the target application's main window is on the display of the window given by pathName, instead of the display con-
taining the application's main window.
-- Serves no purpose except to terminate the list of options. This option is needed only if app could contain a leading "-" character.
APPLICATION NAMES
The name of an application is set initially from the name of the program or script that created the application. You can query and change
the name of an application with the tk appname command.
DISABLING SENDS
If the send command is removed from an application (e.g. with the command rename send {}) then the application will not respond to incom-
ing send requests anymore, nor will it be able to issue outgoing requests. Communication can be reenabled by invoking the tk appname com-
mand.
SECURITY
The send command is potentially a serious security loophole. On Unix, any application that can connect to your X server can send scripts to
your applications. These incoming scripts can use Tcl to read and write your files and invoke subprocesses under your name. Host-based
access control such as that provided by xhost is particularly insecure, since it allows anyone with an account on particular hosts to con-
nect to your server, and if disabled it allows anyone anywhere to connect to your server. In order to provide at least a small amount of
security, Tk checks the access control being used by the server and rejects incoming sends unless (a) xhost-style access control is enabled
(i.e. only certain hosts can establish connections) and (b) the list of enabled hosts is empty. This means that applications cannot con-
nect to your server unless they use some other form of authorization such as that provide by xauth. Under Windows, send is currently dis-
abled. Most of the functionality is provided by the dde command instead.
EXAMPLE
This script fragment can be used to make an application that only runs once on a particular display.
if {[tk appname FoobarApp] ne "FoobarApp"} {
send -async FoobarApp RemoteStart $argv
exit
}
# The command that will be called remotely, which raises
# the application main window and opens the requested files
proc RemoteStart args {
raise .
foreach filename $args {
OpenFile $filename
}
}
KEYWORDS
application, dde, name, remote execution, security, send
Tk 4.0 send(n)