Hi everyone,
I am trying to set up the .profile for a user I have just created. In trying to set up the shell variables, I want to make the shell be korn shell (default shell i believe is Borne shell), so, this is what I did:
SHELL=/usr/bin/ksh
export SHELL
Whenl executing the .profile,... (1 Reply)
Hello,
I want to set some environment variables with this script:
ip=$@
echo Remote Computer: $ip
PERLDB_OPTS="CallKomodo=$ip:9000 RemotePort=$ip:9010 PrintRet=0"
export PERLDB_OPTS
PERL5LIB=/opt/komodo
export PERL5LIB
echo PERLDB_OPTS: $PERLDB_OPTS
echo PERL5LIB: $PERL5LIB
But it... (5 Replies)
I'm not quite sure what I'm doing wrong here.
I've go several jobs which print reports. Occassionally a printer will break down and reports need to be move to another printer. Rather than hard code the printer names in our scripts I'm trying to set these programatically
using our function... (1 Reply)
Normally I would post in the shell scripting area, but this is so basic I thought I'd best put it in the dummy area!
I want to set a series of numbered variables. I have a loop which increments a variable called $i with each loop. I want to name variables with this number e.g. var1, var2, var3... (1 Reply)
i have a file .NAMEexport MY_NAME=JOE
when i do this at the command prompt #. .NAME
$echo MY_NAME
$JOEi created a script called Run.sh . .NAME At the command prompt i did #sh Run.sh
#echo $MY_NAMEit returns nothing. What have i missed out? (7 Replies)
Hi all,
I have a shell script that sets up the environment for an application running on UNIX - ksh. This script is run using:
. ./script_name XX
where XX is a parameter. I want to run it from another shell script but when I do it I don't get the envornment variables set up and the prompt... (3 Replies)
hi all,
I would appreciate if some one could explain me the difference between setting up the variables as shown below
HOME=${HOME:-"/home/user1"}
HOME=/home/user1 (1 Reply)
#!/bin/bash
if ; then
ASS1_DATA_DIR=./
echo $ASS1_DATA_DIR
export ASS1_DATA_DIR
echo "data dir"
fi
if ; then
ASS1_OUTPUT_DIR=./
export ASS1_OUTPUT_DIR
fi
I want to create a new environment variable ASS1_DATA_DIR and ASS1_OUTPUT_DIR in bash and set them to the current... (4 Replies)
Hi all,
This is my first post here. I need to set up a few environment variables with a shell script. Some are hard-coded, but some should come from other commands or as input from the user. How do I do that?
For example, I need to export a variable as such:
export DISPLAY=127.0.0.1:8.0
... (2 Replies)
Hello, I need a little help.
1. Edit /etc/profile so that all users are greeted upon login.
2. For the root account, set the prompt to something like "Danger!! root is doing stuff in \w", preferably in a bright color such as red or pink or in reverse video mode.
Thanks for help. (4 Replies)
Discussion started by: zhshqzyc
4 Replies
LEARN ABOUT OSF1
what
what(1) General Commands Manual what(1)NAME
what - Displays identifying information for Source Code Control System (SCCS) files
SYNOPSIS
what [-s] file...
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
what: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
Searches for just the first occurrence of @(#).
OPERANDS
Pathname of the file to search.
DESCRIPTION
The what command searches the named files for all occurrences of the pattern that get(1) substitutes for the %Z% keyletter, and writes to
standard output whatever follows the pattern up to, but not including, the first " (double quote), > (redirection symbol), newline charac-
ter, (backslash), or null character.
By convention, the value substituted by get(1) for the %Z% keyletter is @(#). (See the get(1) command or the prs(1) command for a descrip-
tion of identification keywords.)
If you specify more than one file, each line of output is preceded by the name of the file it is read from; otherwise, the file name is not
displayed. If no file is specified, what reads from standard input.
The what command is intended for use in conjunction with the get command, which automatically inserts the identifying information. You can
also use the what command on files where the information is inserted manually.
EXIT STATUS
The following exit values are returned: Matches were found. No matches were found.
EXAMPLES
Suppose that the file test.c contains a C program that includes either of the following lines:
char ident[ ] = "@(#)Test Program"; #pragma ident "@(#)Test Program"
If you compile test.c to produce test.o and a.out, you could then enter the following command: what test.c test.o a.out
This command would produce the following displays: test.c: Test Program test.o: Test Program a.out: Test Program
ENVIRONMENT VARIABLES
The following environment variables affect the execution of what: Provides a default value for the internationalization variables that are
unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari-
ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value,
overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as opposed to multibyte characters in arguments and input files). Determines the
locale for the format and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the
processing of LC_MESSAGES.
SEE ALSO
Commands: admin(1), cdc(1), comb(1), delta(1), get(1), prs(1), rmdel(1), sact(1), sccs(1), sccsdiff(1), sccshelp(1), unget(1), val(1)
Files: sccsfile(4)
Standards: standards(5)
Programming Support Tools
what(1)