I used "bc" to convert from decimal to octal then echo to display the character. Neither of these commands are in bash so there is no point in posting my code.
---------- Post updated at 15:35 ---------- Previous update was at 12:18 ----------
One way to convert from decimal to ascii in modern shell (e.g. bash). There may be better methods.
This script outputs the letter "a" by converting decimal 97 to octal 141 (which is held as 8#141) removes the "8#" prefix then outputs the character equivalent of octal 141 with "print".
Code:
typeset -i8 OCT # Octal number
typeset -i10 DEC # Decimal number
DEC=97
OCT=${DEC}
# ${OCT} now contains 8#octal_no
# remove 8# prefix
OCT2=${OCT##8#}
print "\0${OCT2}"
Hi,
I wanted to know what is the maximum length of command which can be run on a bourne (sh) shell? Where can I find that information? Is it different for different OS flavors?
Please help.
Thanks,
Vineet (10 Replies)
I do not claim to be an expert, but I have done things with scripts that whole teams of folks have said can not be done. Of course they should have said we do not have the intestinal fortitude to git-r-done.
I have been using UNIX actually HPUX since 1992. Unfortunately my old computer died and... (7 Replies)
Does anybody know how to Accept a “userid” as a command line argument on a Unix Bourne Shell Script?
The output should be something like this:
User userid has a home directory of /path/directory
the default shell for this user is /path/shell (1 Reply)
Does anybody know how to Accept a “userid” as a command line argument on a Unix Bourne Shell Script?
The output should be something like this:
User userid has a home directory of /path/directory
the default shell for this user is /path/shell (1 Reply)
Does anybody know how to Accept a “userid” as a command line argument on a Unix Bourne Shell Script?
The output should be something like this:
User userid has a home directory of /path/directory
the default shell for this user is /path/shell (5 Replies)
Hi All
I have writing a Korn Shell script to execute it on many of our servers. But some servers don't have Korn Shell installed, they use Borne Shell.
Some operations like calculation don't work :
cat ${file1} | tail -$((${num1}-${num2})) > ${file2}
Is it possible to activate Korn Shell... (3 Replies)
Hi
My Unix sever is AIX 5.3. My Login shell ( using echo $SHELL) is /bin/sh implying it is a Bourne Shell. My Question is that i am still able to use Alias command to create/retrieve aliases. I have read in several sites on Unix online that the Bourne Shell does not support Aliases but... (12 Replies)
Discussion started by: pchegoor
12 Replies
LEARN ABOUT DEBIAN
sethost
SETHOST(1) General Commands Manual SETHOST(1)NAME
sethost - Emulates a DEC VT100 terminal
SYNOPSIS
sethost [options] nodename
Options:
[-Vh] [-e char]
DESCRIPTION
sethost emulates a DEC VT100 terminal.
This application implements the CTERM protocol over DECnet for connecting to a remote DECnet host emulating a DEC VT100 terminal.
dnlogin is a replacement for sethost with more compatibility features.
OPTIONS -e <char>
Set the exit character. By default this is ^]. You can specify the exit character as a control character by preceding it with a cir-
cumflex eg (^A means control-A) or as a number in decimal (default), octal (starting with a zero), or hexadecimal (preceded by 0x or
0X).
-h -? Displays help for using the command.
-V Show the version of the package that sethost was built with.
EXAMPLES
Connect to remote VAX host named "mv3100".
sethost mv3100
HELPFUL HINTS
The CTERM specifications available from Digital does not include how to setup VMS terminal characteristics, so the host cannot identify the
capabilities of the session we are creating. The simplest workaround is to set the terminal capabilities manually upon login or including
the following command in the login.com DCL procedure.
$ SET TERM/DEC_CRT
SEE ALSO dntype(1), dndir(1), dndel(1), dntask(1), dnping(1)DECnet utilities July 27 1998 SETHOST(1)