Sponsored Content
Top Forums UNIX for Dummies Questions & Answers A very simple script, but alias won't work Post 302423604 by sssccc on Friday 21st of May 2010 11:54:59 AM
Old 05-21-2010
Quote:
Originally Posted by ygemici
let try this
Code:
chmod u+x al

So must give execute permission to your script
Tried that. Still no go. Same message.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

why won't this Work?

hey programmers! 1-why won't gcc accept as an argument? i tried the recommendations on the man page of getch(),..etc. nothing worked. 2-why it won't see <iostream> && <fstream> even if i implemented the function as follow std::cout<<"..etc"<<endl; 3-after i type this code in it gives... (6 Replies)
Discussion started by: mbabeli
6 Replies

2. UNIX for Dummies Questions & Answers

Simple cron job won't work

I have a script in a directory -say users/me/test/ It looks like this: # "bkup" - copies specified files to the user's ~/Backup # directory after checking for name conflicts. a=$(date +%T) cp $1 ~/test/Backup/$1.$a It copies file.txt from current directory and timestamps the name of it of... (4 Replies)
Discussion started by: coregan
4 Replies

3. UNIX for Dummies Questions & Answers

tip: Simple script won't run in cygwin - vim editor involved

I ran into this issue and thanks to various postings in various forums, was able to figure out the solution but didn't see one posting that laid the whole issue out cleanly. So thought the following might help others ... ------------------------------------------------------------------------... (2 Replies)
Discussion started by: oxysep
2 Replies

4. Shell Programming and Scripting

Global alias does not work in shell script

Hi Linux Set up - alias ls='ls -l' Then run script #! /bin/ksh sub() { ls } sub Is there any way to get it working. I don't want to define alias inside of the program Thank you (2 Replies)
Discussion started by: zam
2 Replies

5. UNIX for Dummies Questions & Answers

sed won't work

Hi All, can anybody tell me what's wrong with this code? # SEARCH replaced by REPLACE #!/bin/bash SEARCH="95$$ 0 t" REPLACE="95$$ 1 t" for I in `ls *000.inp | cut -c-12`; do echo $I sed 's/$SEARCH/$REPLACE/' ${I}-000.inp > ${I}-100.inp done It don't replace the string... (5 Replies)
Discussion started by: f_o_555
5 Replies

6. Shell Programming and Scripting

created a .alias, but they won't take (ksh)

I login with a common username, and have no access to the different login scripts for my personalizations. So for a while, I would hobble on over to a directory I made for myself, and then bring in my alias file where I would fix my backspace, create a few aliases, etc.: $ ./.alias $ Now... (4 Replies)
Discussion started by: hindesite
4 Replies

7. Shell Programming and Scripting

Crontab - wrote Simple Script but i cant work out how to play it at a certain time.

Hi everyone. Silly might be silly be I'm still new to bash. I'm trying to make an Alarm Clock for in the morning using my laptop i have wrote this Simple Script but i cant work out how to play it at a certain time. #!/bin/bash cd /home/josh/Music/Bruno_Mars/Hooligans/ cvlc... (8 Replies)
Discussion started by: jtsmith90
8 Replies

8. BSD

Install cd won't work

Hi! I'm sure that somebody here installed freeBSD from a download of a virtual disc (.iso). But I made 5 downloads of 5 differents freeBSD installation (and no one has worked).Can somebody tell me where to download and how (if needed) to prepare the cd? (8 Replies)
Discussion started by: maxum
8 Replies

9. Shell Programming and Scripting

Nested double quotes won't work in my bash script?

In a bash script I have: LSCMD="find /project/media/ -mindepth 2 -maxdepth 2 -name \"files*pkg\"" ALL_PACKAGES=$( $LSCMD | sort 2>/dev/null) But I get nothing returned. It's just all blank. If I run the find command in a terminal, I get dozens of hits. I figure it's the way how I'm... (3 Replies)
Discussion started by: superbbrr
3 Replies

10. UNIX for Beginners Questions & Answers

Bash script won't run because hardware won't produce display

Can anyone offer any advice on how to modify the script below to work on a new system we have, that has no graphics capability? We admin the system through a serial RAS device. I've tried running the below script through the RAS and through an ssh -X session. It failed with something like "GTK... (3 Replies)
Discussion started by: yelirt5
3 Replies
MH-ALIAS(5)                                                          [nmh-1.5]                                                         MH-ALIAS(5)

NAME
mh-alias - alias file for nmh message system SYNOPSIS
any nmh command DESCRIPTION
This describes both nmh personal alias files and the global alias file for nmh mail delivery, the file /etc/nmh/MailAliases It does not describe aliases files used by the message transport system. Each line of the alias file has the format: alias : address-group or alias ; address-group or < alias-file or ; comment where: address-group := address-list | < file | = UNIX-group | + UNIX-group | * address-list := address | address-list, address Continuation lines in alias files end with `' followed by the newline character. "Alias-file" and "file" are UNIX file names. UNIX-group is a group name (or number) from /etc/group. An address is a "simple" Inter- net-style address. Througout this file, case is ignored, except for file names. If the line starts with a `<', then the file named after the `<' is read for more alias definitions. The reading is done recursively, so a `<' may occur in the beginning of an alias file with the expected results. If the address-group starts with a `<', then the file named after the `<' is read and its contents are added to the address-list for the alias. If the address-group starts with an `=', then the file /etc/group is consulted for the UNIX-group named after the `='. Each login name occurring as a member of the group is added to the address-list for the alias. In contrast, if the address-group starts with a `+', then the file /etc/group is consulted to determine the group-id of the UNIX-group named after the `+'. Each login name occurring in the /etc/passwd file whose group-id is indicated by this group is added to the address-list for the alias. If the address-group is simply `*', then the file /etc/passwd is consulted and all login names with a userid greater than some magic number (usually 200) are added to the address-list for the alias. In match, a trailing "*" on an alias will match just about anything appropriate. (See example below.) An approximation of the way aliases are resolved at posting time is (it's not really done this way): 1) Build a list of all addresses from the message to be delivered, eliminating duplicate addresses. 2) If this draft originated on the local host, then for those addresses in the message that have no host specified, perform alias resolu- tion. 3) For each line in the alias file, compare "alias" against all of the existing addresses. If a match, remove the matched "alias" from the address list, and add each new address in the address-group to the address list if it is not already on the list. The alias itself is not usually output, rather the address-group that the alias maps to is output instead. If "alias" is terminated with a `;' instead of a `:', then both the "alias" and the address are output in the correct format. (This makes replies possible since nmh aliases and personal aliases are unknown to the mail transport system.) Since the alias file is read line by line, forward references work, but backward references are not recognized, thus, there is no recur- sion. Example Alias File: </etc/nmh/BBoardAliases sgroup: fred, fear, freida b-people: Blind List: bill, betty; fred: frated@UCI UNIX-committee: <unix.aliases staff: =staff wheels: +wheel everyone: * news.*: news The first line says that more aliases should immediately be read from the file /etc/nmh/BBoardAliases. Following this, "fred" is defined as an alias for "frated@UCI", and "sgroup" is defined as an alias for the three names "frated@UCI", "fear", and "freida". The alias "b-people" is a blind list which includes the addresses "bill" and "betty"; the message will be delieved to those addresses, but the message header will show only "Blind List: ;" (not the addresses). Next, the definition of "UNIX-committee" is given by reading the file unix.aliases in the users nmh directory, "staff" is defined as all users who are listed as members of the group "staff" in the /etc/group file, and "wheels" is defined as all users whose group-id in /etc/passwd is equivalent to the "wheel" group. Finally, "everyone" is defined as all users with a user-id in /etc/passwd greater than 200, and all aliases of the form "news.<anything>" are defined to be "news". The key thing to understand about aliasing in nmh is that aliases in nmh alias files are expanded into the headers of messages posted. This aliasing occurs first, at posting time, without the knowledge of the message transport system. In contrast, once the message trans- port system is given a message to deliver to a list of addresses, for each address that appears to be local, a system-wide alias file is consulted. These aliases are NOT expanded into the headers of messages delivered. HELPFUL HINTS
To use aliasing in nmh quickly, do the following: 1) In your .mh_profile, choose a name for your alias file, say "aliases", and add the line: Aliasfile: aliases 2) Create the file "aliases" in your nmh directory. 3) Start adding aliases to your "aliases" file as appropriate. FILES
/etc/nmh/MailAliases global nmh alias file PROFILE COMPONENTS
Aliasfile: For a default alias file SEE ALSO
ali(1), send(1), whom(1), group(5), passwd(5), conflict(8), post(8) CONTEXT
None BUGS
Although the forward-referencing semantics of mh-alias files prevent recursion, the "< alias-file" command may defeat this. Since the num- ber of file descriptors is finite (and very limited), such infinite recursion will terminate with a meaningless diagnostic when all the fds are used up. Forward references do not work correctly inside blind lists. MH.6.8 11 June 2012 MH-ALIAS(5)
All times are GMT -4. The time now is 09:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy