Alias not working


 
Thread Tools Search this Thread
Operating Systems Solaris Alias not working
# 22  
Old 09-28-2014
Quote:
Originally Posted by wisecracker
Where else is universally common that usually has R/W(/X) access?
Pretty much nowhere by design, with the precise goal of preventing exactly what you're trying to do. All you're trying to do is inject little alternative utilities, but criminals use this method to inject compilers, daemons, and brute-forcing tools like expect onto otherwise clean systems.

So, an unavoidably bad idea. Sorry.

Last edited by Corona688; 09-28-2014 at 12:47 AM..
# 23  
Old 09-28-2014
achenle, with linking grep would always be grep, no ggrep or anything else for that matter.
That being done to avoid defining shell variables for regular tools.
Best is to have one source script (where you define your enviroment as you see fit per OS requirment, link the tools etc.
The main script would never change, just the source one (for adding OS compatibility and such).

Is that wrong ? Smilie

As for -q and standards, i had no clue, it was just an example that things can be done without using additional switches which can be a problem on operating systems not conforming to standards.

Isn't tar -z switch actually non standard tar implementation ?
Tar is an archiver not a compresser as far as i know.

Regards
Peasant.
# 24  
Old 09-28-2014
Quote:
Originally Posted by nexional
Yes Don, there are other utilities in there (/usr/xpg4/bin) which are causing problem so I can't just set the PATH to prioritize this path.
That is the issue you might want to fix in the first place. If these POSIX compliant utilities are causing problems, your script is non portable.

Moreover, you do not tell what shell interpreter you are using (legacy Bourne sh, ksh88, ksh93, bash, whatever) and you do not tell either where you define your aliases and how these definitions are passed to the scripts.
# 25  
Old 09-28-2014
Quote:
Originally Posted by Peasant
... ... ...

Isn't tar -z switch actually non standard tar implementation ?
Tar is an archiver not a compresser as far as i know.

Regards
Peasant.
Neither tar nor cpio are in the standards. The pax utility is in the standards and can read and write archives in the formats used by both tar and cpio. The standards do not specify an option to have pax process compressed archives, but most implementations that provide the tar -z option or the cpio -z option also provide a pax extension to produce compressed archives in either format.
This User Gave Thanks to Don Cragun For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Lost with this alias why it is not working

Hi, I have the following aliases: $: alias | grep "^du=" du='du -s * 2>/dev/null | awk '\''{ printf "%4.2f-KB ==> %s \n", $1/1024 , $2 }'\'' | sort -rn' $: alias | grep "^dutop10=" dutop10='du -s * 2>/dev/null | awk '\''{ printf "%4.2f-KB ==> %s \n", $1/1024 , $2 }'\'' | sort -rn | head... (2 Replies)
Discussion started by: newbie_01
2 Replies

2. Shell Programming and Scripting

Alias not working

I have several shell scripts which contain the nawk command. Here is what i m doing assign the correct value to nawk as nawk is not found on a new systems. Here is what i did. more test.sh ] && alias nawk=/usr/bin/gawk ] && alias nawk=/usr/bin/nawk ] && alias nawk=/usr/bin/awk... (7 Replies)
Discussion started by: mohtashims
7 Replies

3. Solaris

Alias is not working under Bourne Shell

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

4. Red Hat

[SOLVED] How the alias is working?

Iam facing some strange issue with alias. I have an alias file in which i have created lot of aliases as given below. export BUILD_HOME=/apps/psr/build export DB_HOME=/apps/psr/database export LOGS_HOME=/apps/psr/logs export BUILD_TEST=/apps/psr/build_dev/build_test export... (0 Replies)
Discussion started by: Vikram_Tanwar12
0 Replies

5. UNIX for Dummies Questions & Answers

cp command not working with alias

Hi Friends, I have added some aliases in .bash_profile file under the root folder. Its works fine and very useful, but does not go well with cp command. alias deploy="cd /usr/local/tomcat/webapp" alias artifacts="cd /usr/local/artifacts" but when i try to cp from artifacts folder... (2 Replies)
Discussion started by: prashdeep
2 Replies

6. Solaris

Simple question: alias not working for root

OS = Solaris 8 Issue: alias not working for root, but working for regular users # grep root /etc/passwd root:x:0:1:Super-User:/:/sbin/sh # alias dir=ls # dir dir: not found # alias dir="ls -l" # dir dir: not found # alias dir='ls -l' # dir dir: not found # alias... (2 Replies)
Discussion started by: aixlover
2 Replies

7. Solaris

Alias not working

Hello, I am trying to set an alias in my .kshrc or .profile and when I do it is not setting. If I do it manually it works fine. Is there another file I should put this in? Here is the alias I am using. alias ll='ls -ltr' I am using solaris 9. When I type alias it does not show these... (5 Replies)
Discussion started by: dkranes
5 Replies

8. UNIX for Dummies Questions & Answers

alias command not working after re-login

i create some alias in .cshrc file then i run source .cshrc to refresh it, the alias command work fine but when i relogin again, the alias command is not working... i need to re-run the source .cshrc command so that the alias only workable. any idea on it? (7 Replies)
Discussion started by: lsy
7 Replies

9. UNIX for Dummies Questions & Answers

alias not working in scripts

Hi All, PF below details, > cat run.sh #!/usr/bin/ksh alias ll="ls -l" > ./run.sh > ll ksh: ll: not found. Pls help on this? Thanks in Advance, Naga :cool: (2 Replies)
Discussion started by: Nagapandi
2 Replies

10. UNIX for Advanced & Expert Users

host alias not working: host not found

Hello, I am working on HP-UX , and in the /etc/hosts file we have setup an alias: aa.bb.cc.dd devmach2.unix.org devmach2 devma2v The alias devma2v does not work. Error when pinging devma2v ping: unknown host devma2v For devmach2 the ping works fine , returning the correct IP... (4 Replies)
Discussion started by: FunnyCats
4 Replies
Login or Register to Ask a Question