Hi,
I have a script called sam.sh which consists of a single echo statement like this
#/usr/bin/ksh
echo "Mani"
I changed the mode for the script by giving chmod a+x sam.sh.
If I want to execute the scrpt by just giving the name at the command line "sam.sh", what should I necessarily do?... (3 Replies)
If I did indeed grep something out of it, why woudln't $result show nothing?
When I do $? , it does show success...
What is the proper syntax so that $result shows actual thing it's grepping out?
result=`(ssh $host tail -1 /something/somethingelse) | egrep -i "value" >dev/null`
#echo... (3 Replies)
Hi All,
I am new to shell scripting.
I have a variable which holds a numeric value.I have to check whether this variable holds a value between(0- 8),(8-17)(17-24).How do i write this syntax using if in shell scripting.
Thanks
Vignesh (2 Replies)
I would like to know:
1. How is `command` used?
2. How is '$command' used?
For example, a script file that checks for apache tomcat processes that I created has the following lines:
test
set suffix=` grep "6.0.18"`
set command = `ps -ef $suffix`
echo $command //?? hoping this... (2 Replies)
I'm new to shell scripting and would like to know what would be the best syntax to delete multiple directories in the same location? This is what I tried but it didn't work.
echo "clearing webtop and da cache."
su - $TOMCAT_USER -c rm -rf... (5 Replies)
Hey I have to create a unix script that when run uses the 'man' command to print out the command information of commands passed as arguments. I have the basic pseudo code, but I don't know how to implement a loop. Any help is greatly appreciated. Cheers.
short-manual <ls cc pwd>... (3 Replies)
Hi,
I am very new to this forum, can any one tell me which is the very basic certification on unix shell scripting?
please give me an advice on this. (1 Reply)
Hi All,
I am a newbie to shell scripting. I am trying to something like this.
#!bin/bash
cd /u01/app/oracle/
# then start the process
./opmnctl startall
Can someone help me with this requirement.
Help is very much appreciated.
Thanks
Venkat
Please use code tags next time for... (10 Replies)
Discussion started by: venkat8439
10 Replies
LEARN ABOUT OSF1
trbsd
trbsd(1) General Commands Manual trbsd(1)NAME
trbsd - Translates characters
SYNOPSIS
trbsd [-Acs] string1 string2
trbsd -d [-Ac] string1
The trbsd command copies characters from the standard input to the standard output with substitution or deletion of selected characters.
OPTIONS
Translates on a byte-by-byte basis. When you specify this option, trbsd does not support extended characters. Complements (inverts) the
set of characters in string1 with respect to the universe of characters whose codes are 001 through 377 octal if you specify -A, and all
characters if you do not specify -A. Deletes all characters in string1 from output. Changes characters that are repeated output charac-
ters in string2 into single characters.
DESCRIPTION
Input characters from string1 are replaced with the corresponding characters in string2. The trbsd command cannot handle an ASCII NUL
( 00) in string1 or string2; it always deletes NUL from the input.
The tr command is a System V compatible version of trbsd.
Abbreviations such as a-z, standing for a string of characters whose ASCII codes run from character a to character z, inclusive, can be
used to introduce ranges of characters. Note that brackets are not special characters.
Use the escape character (backslash) to remove the special meaning from any character in a string. Use the followed by 1, 2, or 3
octal digits for the code of a character.
If a given character appears more than once in string1, the character in string2 corresponding to its last appearance in string1 will be
used in the translation.
EXAMPLES
To translate braces into parentheses, enter: trbsd '{}' '()' <textfile >newfile
This translates each { (left brace) to a ( (left parenthesis) and each } (right brace) to a ) (right parenthesis). All other char-
acters remain unchanged. To translate lowercase ASCII characters to uppercase, enter: trbsd a-z A-Z <textfile >newfile The two
strings can be of different lengths: trbsd 0-9 # <textfile >newfile
This translates each digit to a # (number sign); if string2 is too short, it is padded to the length of string1 by duplicating its
last character. To translate each string of digits to a single # (number sign), enter: trbsd -s 0-9 # <textfile >newfile To trans-
late all ASCII characters that are not specified, enter: trbsd -c ' -~' 'A-_' <textfile >newfile
This translates each nonprinting ASCII character to the corresponding control key letter ( 01 translates to A, 02 to B, and so
on). ASCII DEL (177), the character that follows ~ (tilde), translates to a ? (question mark).
SEE ALSO
Commands: ed(1), sh(1), tr(1)
Files: ascii(5)trbsd(1)