Sponsored Content
Full Discussion: alias commands
Top Forums Shell Programming and Scripting alias commands Post 302527536 by Corona688 on Friday 3rd of June 2011 01:46:58 PM
Old 06-03-2011
Have /etc/profile source an extra file for them when they belong to the right group. How about:

Code:
# in /etc/profile
if groups | egrep -q "(^| )mygroup($| )"
then
        source /etc/group-aliases
fi

/etc/group-aliases is a file that's readable and writable by mygroup.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

1 alias 2 commands 1 argument

Hi, i want make 1 alias with two commands include to do two things at the same time like this: ex: do finger and last at the same time with only one word finla or something. Thanks.- /home/seba > finger dustin Login name: dustin In real life: Dustin Feldman Directory:... (3 Replies)
Discussion started by: seba
3 Replies

2. UNIX for Dummies Questions & Answers

Alias confusion - multiple commands ?

I've read the man on the alias command, and I am perplexed. I don't see a way to create an alias that will perform more than one command......is there a way to create an alias that is a string of a commands ? (1 Reply)
Discussion started by: HikerLT
1 Replies

3. UNIX for Dummies Questions & Answers

Alias commands

how do you alias a command... Like say I wanted kitten to exicute the command whoami. how would I do that? Thank you for your time. (2 Replies)
Discussion started by: Mars8082686
2 Replies

4. Programming

code that reads commands from the standard i/p and executes the commands

Hello all, i've written a small piece of code that will read commands from standard input and executes the commands. Its working fine and is execting the commands well. Accepting arguments too. e.g #mkdir <name of the directory> The problem is that its not letting me change the directory i.e... (4 Replies)
Discussion started by: Phrozen Smoke
4 Replies

5. UNIX for Dummies Questions & Answers

Alias Help

Can someone help me with an alias...? (1 Reply)
Discussion started by: NetJones
1 Replies

6. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

7. UNIX for Dummies Questions & Answers

How to make delays between multiple commands in an alias (ircII)?

Okay so I have an alias that looks like this: ALIAS gscn { MSG gscn Test1 MSG gscn Test2 MSG gscn Test3 MSG gscn Test4 MSG gscn Test5 } How do I make it wait 5 seconds between each command before it executes the next one after that in order from top to bottom? I tried the TIMER... (1 Reply)
Discussion started by: guitarscn
1 Replies

8. UNIX for Dummies Questions & Answers

Passing arguments to alias with multiple commands

I have a few aliases set up on AIX servers in my .kshrc file. Some of them contain multiple commands that are piped together. A simple example would be something like this: # alias to list directory contents as root and sort by size. alias lss='sudo ls -l | sort -nbk5' When I call... (5 Replies)
Discussion started by: derndingle
5 Replies

9. AIX

HACMP: difference between 'cl' commands and 'cli' commands

Hi all, I'm new in this forum. I'm looking for the difference between the HACMP commands with the prefix "cl" and "cli". The first type are under /usr/es/sbin/cluster/sbin directory and the second are under /usr/es/sbin/cluster/cspoc directory. I know that the first are called HACMP for AIX... (0 Replies)
Discussion started by: peppix
0 Replies

10. UNIX for Dummies Questions & Answers

Create alias files (not alias commands)

If one: $ find -name 'some expression' -type f > newfile and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory. I am... (3 Replies)
Discussion started by: Alexander4444
3 Replies
ALI(1)								     [nmh-1.5]								    ALI(1)

NAME
ali - list mail aliases SYNOPSIS
ali [-alias aliasfile] [-list | -nolist] [-normalize | -nonormalize] [-user | -nouser] [-version] [-help] [aliases ...] DESCRIPTION
Ali searches the named mail alias files for each of the given aliases. It creates a list of addresses for those aliases, and writes that list on standard output. If no arguments are given, ali outputs all alias entries. By default, when an aliases expands to multiple addresses, the addresses are separated by commas and printed on as few lines as possible. If the -list option is specified, then when an address expands to multiple addresses, each address will appear on a separate line. The switch -user directs ali to perform its processing in an inverted fashion: instead of listing the addresses that each given alias expands to, ali will list the aliases that expand to each given address. If the -normalize switch is given, ali will try to track down the official hostname of the address. The files specified by the profile entry "Aliasfile" and any additional alias files given by the -alias aliasfile switch will be read. Each alias is processed as described in mh-alias(5). FILES
$HOME/.mh_profile The user profile /etc/passwd List of users /etc/group List of groups PROFILE COMPONENTS
Path: To determine the user's nmh directory Aliasfile: For a default alias file SEE ALSO
mh-alias(5) DEFAULTS
`aliasfiles' defaults to /etc/nmh/MailAliases `-nolist' `-nonormalize' `-nouser' CONTEXT
None BUGS
The -user option with -nonormalize is not entirely accurate, as it does not replace local nicknames for hosts with their official site names. MH.6.8 11 June 2012 ALI(1)
All times are GMT -4. The time now is 03:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy