06-04-2006
This is quite old thread though, but stillI want to know about few concepts here, like what is meant by:
Quote:
1)an exported alias will survive a fork(2), but not an exec(2))
2)Exported aliases are available to subshells, for example, ( prog )
3)shell scripts that do not start with #!/bin/*.
Regards,
Tayyab
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I'm throwing this out there as a novice to the Unix world...I've
been working on a project that requires me to ouput (using the echo command) a list of names in a single column format, but the problem is the input is in row format followed by a blank space...If anyone could give me a... (2 Replies)
Discussion started by: dmhonor914
2 Replies
2. Shell Programming and Scripting
hi everybody,
i learning unix now only.Can u pls guide me in invoking a shell script.Actually i need to know how to write the command for invoking the shell script.Suppose the shell file name is count , then how i will write the command.
thanks (1 Reply)
Discussion started by: gopa_mani
1 Replies
3. UNIX for Dummies Questions & Answers
hi all,
forgive me if this question is not relevant to this section.
i have a shell file that will automatically deploy the files that are necessary and will compile them. i need to automate this management process through cruise control, for this i need to know whether it is possible for me to... (2 Replies)
Discussion started by: sais
2 Replies
4. Shell Programming and Scripting
Hi all,
I have a shell script which does db shutdown ..the script snippet which does this is as follows:
function call_sql_plus {
${SQLPLUS:-sqlplus} -s /nolog <<EOF
EXIT;
EOF
if
then
echo "Error occurred while calling sqlplus "
... (3 Replies)
Discussion started by: KrishnaSaran
3 Replies
5. Shell Programming and Scripting
Hi All ,
i am trying to switch user (from unix1 to unix 2 ) The user will give me the input and also the password . also how can i login into with the password . itried several attempts . no luck
Can any one help on this !!! (4 Replies)
Discussion started by: raghav1982
4 Replies
6. Shell Programming and Scripting
i have a script which has 2 options.
a
b
And a has 6 sub options.
i want to write a script which will call the parent script and give options automatically.
examle:
linasplg11:/opt/ss/kk/01.00/bin # startup.sh
/opt/ss/rdm/01.00
Please select the component to... (2 Replies)
Discussion started by: Aditya.Gurgaon
2 Replies
7. UNIX for Dummies Questions & Answers
Hello all,
Is there a way I can invoke a shell script when ever a new mail is delivered to my account in solaris? Something like .forward file, instead of forwarding it to another email id, I want the email to be passed onto some shell script.
Basically I want to extract the envelop... (3 Replies)
Discussion started by: atukuri
3 Replies
8. Shell Programming and Scripting
Attempting to write a script to eventually notify me via email for when there is packetloss across the backbone. I am looking for values greater than 0% in the mtr field.
#!/bin/sh
target=www.google.com
date +"%D"_"%T" >> /home/rich/mtr.log
echo "----------------------------------------" >>... (1 Reply)
Discussion started by: closedown
1 Replies
9. AIX
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
10. Solaris
Hi,
Please assist me why HC alias is not working under this shell?
root@singapore # grep HC /.profile
alias HC='cd /var/tmp/HC/2015/`date +%B`'
root@singapore # . /.profile
Sourcing //.profile-EIS.....
root@singapore # echo $HC
root@singapore # HC
HC: not found
root@singapore # echo... (18 Replies)
Discussion started by: tprabhu1983
18 Replies
alias(1) General Commands Manual alias(1)
NAME
alias - Defines or displays aliases
SYNOPSIS
alias [-tx] [alias-name[=string...]]
Note
The C shell has a built-in version of the alias command. If you are using the C shell, and want to guarantee that you are using the com-
mand described here, you must specify the full path /usr/bin/alias. See the csh(1) reference page for a description of the built-in com-
mand.
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
alias: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
[Tru64 UNIX] Sets or lists tracked aliases. [Tru64 UNIX] Sets or lists exported aliases.
Note
See the ksh(1) reference page for a description of tracked and exported aliases.
OPERANDS
Prints the alias definition on standard output. Assigns the value of string to the alias alias-name.
If no options and no operands are specified, all alias definitions are printed on standard output.
DESCRIPTION
The alias utility creates or redefines alias definitions or writes the values of existing alias definitions to standard output. An alias
definition provides a string value that replaces a command name when it is encountered.
An alias definition affects the current shell execution environment and the execution environments of the subshells of the current shell.
When used as described, the alias definition will not affect the parent process of the current shell nor any utility environment invoked by
the shell.
NOTES
[Tru64 UNIX] This reference page describes the creation and maintenance of aliases. See the Command Aliasing section of the ksh(1) or
sh(1p) reference pages for the description of alias substitution.
RESTRICTIONS
[Tru64 UNIX] If you use either the -t option or the -x option, you must use at least one alias-name or alias-name=string operand.
[Tru64 UNIX] Aliasing is performed when scripts are read, not while they are executed. Therefore, for an alias to take effect, the alias
definition command has to be executed before the command that references the alias is read.
[Tru64 UNIX] Aliases can be used to redefine special built-in commands but cannot be used to redefine the reserved words listed in the
ksh(1) reference page.
EXIT STATUS
The following exit values are returned: Successful completion. One of the name operands specified did not have an alias definition, or an
error occurred.
EXAMPLES
Change ls to give annotated output in columns: alias ls="ls -CF" Create a simple redo command to repeat previous entries in the command
history file: alias r='fc -s' Cause du to use 1K units instead of the default 512-bytes: alias du=du -k Set up nohup so that it can deal
with an argument that is itself an alias name: alias nohup="nohup "
ENVIRONMENT VARIABLES
The following environment variables affect the execution of alias: 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,
override 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). 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_MES-
SAGES.
SEE ALSO
Commands: csh(1), ksh(1), Bourne shell sh(1b), POSIX shell sh(1p), unalias(1)
Standards: standards(5)
alias(1)