I don't use screen, so I'm not at all familiar with it. However, as you suspect, that command substitution will not properly handle the single quotes nor the glob characters (e.g. *, ?, [...], etc) in that screen command-string argument.
As long as it's trusted input, you can try: res=$(eval "$cmd")
Hi all...
This is probably the simplest question but its driving me round the bend :-(
does anyone know how to store a single quote in a variable. Im using cygwin bash
for example
single_qoute = " ' "
echo single_quote
dosnt work :-( it is absolutely baffling me!
The reason why... (4 Replies)
I'm having trouble manipulating a string that contains single quotes (') in it. I'm writing a ksh script to parse in a few queries from a config file, such as this:
findbug \(\(Project 'in' "Deployment,HDRCI,LHS,LSS,WUCI" '&&' Status 'in' "N" '&&' New_on 'lessthan' "070107" \)\) '&&' \(Class... (9 Replies)
I'm not very familiar with the ssh command. When I tried to set a variable and then echo its value on a remote machine via ssh, I found a problem. For example,
$ ITSME=itsme
$ ssh xxx.xxxx.xxx.xxx "ITSME=itsyou; echo $ITSME"
itsme
$ ssh xxx.xxxx.xxx.xxx 'ITSME=itsyou; echo $ITSME'
itsyou
$... (3 Replies)
Hi,
I am trying to create a script which validates the incoming source files. The script has File name Pattern as Argument. The First part of the script validates if there are any files available
if
then
echo "\n Files are available to process \n"
else
echo "\n File does not... (9 Replies)
Hi guys, I have a sed line in double quotes which works fine, but I want it to be in single quotes
here is the sed line
sed "/abc_def/s/\'.*\'/\'\${abc_def}\'/"
can some one give the equivalent to the above script in single quotes
Thanks a ton (5 Replies)
Unix superusers,
I am new to unix but would like to learn more about grep. I am very familiar with regular expressions as i have used them for searching text files in windows based text editors. Since I am not very familiar with Unix, I dont understand when one should use GREP with the... (2 Replies)
Hi I want to replace single quote with two single quotes in a perl string.
If the string is <It's Simpson's book> It should become <It''s Simpson''s book> (3 Replies)
Hi,
Trying to change the prompt. I have the following code.
export PS1='
<${USER}@`hostname -s`>$ '
The hostname is not displayed
<abc@`hostname -s`>$ uname -a
AIX xyz 1 6 00F736154C00
<adcwl4h@`hostname -s`>$
If I use double quotes, then the hostname is printed properly but... (3 Replies)
Discussion started by: bobbygsk
3 Replies
LEARN ABOUT OSX
receive
term::receive(n) Terminal control term::receive(n)
__________________________________________________________________________________________________________________________________________________NAME
term::receive - General input from terminals
SYNOPSIS
package require Tcl 8.4
package require term::receive ?0.1?
::term::receive::getch ?chan?
::term::receive::listen cmd ?chan?
cmd process string
cmd eof
::term::receive::unlisten ?chan?
_________________________________________________________________DESCRIPTION
This package provides the most primitive commands for receiving characters to a terminal. They are in essence convenient wrappers around
the builtin commands read and fileevent.
::term::receive::getch ?chan?
This command reads a single character from the channel with handle chan and returns it as the result of the command.
If not specified chan defaults to stdin.
It is the responsibility of the caller to make sure that the channel can provide single characters. On unix this can be done, for
example, by using the command of package term::ansi::ctrl::unix.
::term::receive::listen cmd ?chan?
This command sets up a filevent listener for the channel with handle chan and invokes the command prefix cmd whenever characters
have been received, or EOF was reached.
If not specified chan defaults to stdin.
The signature of the command prefix is
cmd process string
This method is invoked when characters were received, and string holds them for processing.
cmd eof
This method is invoked when EOF was reached on the channel we listen on. It will be the last call to be received by the
callback.
::term::receive::unlisten ?chan?
This command disables the filevent listener for the channel with handle chan.
If not specified chan defaults to stdin.
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category term of
the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
KEYWORDS
character input, control, get character, listener, receiver, terminal
CATEGORY
Terminal control
COPYRIGHT
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
term 0.1 term::receive(n)