Problem with alias and invisible text


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem with alias and invisible text
# 1  
Old 03-03-2008
Problem with alias and invisible text

okay how do i make an alias that has a space in it?

for most of my other ones i've simply done within my ~/.bash_profile

alias `ls`='ls -laF'

but with

alias `sudo su`='sh hello.sh'
I'm unable to make it work

in addition i was wondering how i could allow the user to type in invisible text

any help appreciated
# 2  
Old 03-05-2008
Quote:
okay how do i make an alias that has a space in it?
You don't - the whole point of making aliases is to have a shorthand term for a command or series of commands. The other problem with "sudo su" is that you are trying to set up an alias to override an actual command, sudo. If sudo is installed, then you will be making it so that command doesn't work (unless you give the path to it (example: /usr/local/bin/sudo ).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Facing problem with Alias created through script.

Hi Guru's, I am creating alias for db instance running on a server through script, am able to create them based on /etc/oratab entries and can use successfully with the below script. #!/bin/bash SCRIPT_PATH=${HOME}/scripts/db/script... (3 Replies)
Discussion started by: venky.b5
3 Replies

2. Shell Programming and Scripting

Alias problem

Please forgive me if this is too stupid a question as I am fairly new to scripting. I have an alias in my .profile (ksh) like this: alias ff='find . -name $1' The idea is to find all files in current dir and all subdir with the name specified in the param passed. So, I issue the command:... (8 Replies)
Discussion started by: sssccc
8 Replies

3. Red Hat

alias ip problem,i canīt find out solution

hi, we have eth1; in the beginning it was proposed to create from eth1, eth1.2500 and eth1.240. It did not worked cause vlan 1.2500 was not tagged in the switch. so they decided to leave eth1 like a physical interface with eth1.2500 config (removel vlan tag) and create eth1.240 but it did... (0 Replies)
Discussion started by: pabloli150
0 Replies

4. Shell Programming and Scripting

To make password/input text invisible?

All, My script is ----------- #cat pass.sh password=123 echo -n "Enter pass:" read pass if ; then echo "Correct password" else echo "Wrong password" fi When i run this script, text(password) which i'm entering is visible in screen... (4 Replies)
Discussion started by: thomasraj87
4 Replies

5. Shell Programming and Scripting

Alias problem with awk command

Hi to all, I'm facing some problems when adding an alias like: #alias list="ls -al | awk '{ print $1, $2, $3, $4, (($5/1048576))"\t", $6, $7, $8, $9 }'" and when I enter: #list I get: Syntax Error The source line is 1. The error context is { print >>> , <<< awk:... (3 Replies)
Discussion started by: enux
3 Replies

6. Linux

mail alias problem

Hi all, well i am configuring backuppc for awhile, anyway my current problem is, i set a smarthost, configured the mail to use our ISP smtp server, and its working successfully thanks to ALLAH, now i want to set an alias for mails( it was working when it was using the local smtp server), so the... (0 Replies)
Discussion started by: XP_2600
0 Replies

7. Shell Programming and Scripting

alias defining problem in .cshrc file

Hi folks, I'm trying to define the following command as alias in .cshrc file: ls -ltr | grep ^d | awk '{print $9}' | xargs du -hs I defined it as the following: alias nirdirs '`ls -ltr | grep "^d" | awk "{print \\$9}" | xargs du -hs`' I've got the following error when I've run the alias:... (7 Replies)
Discussion started by: nir_s
7 Replies

8. OS X (Apple)

Problem using a top command alias in my profile

Hi- I am newish to the mac osx unix interface. I want to set up top so that it always displays the username. I can use this command to do this: top -ocpu -P ' PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE USER' -p '$aaaa ^bbbbbbbbb $cccc $wwwwwww $ee... (1 Reply)
Discussion started by: mikey11415
1 Replies

9. UNIX for Dummies Questions & Answers

Alias problem

i'm trying to get the alias alias "sudo su"=`sh script.sh` whats wrong with this and how can i make an alias that has a space in it (1 Reply)
Discussion started by: cleansing_flame
1 Replies

10. UNIX for Dummies Questions & Answers

alias problem

How can I get two commands in one alias? In my exaple it only display the current date. alias two='cal | date' (5 Replies)
Discussion started by: Mattiax
5 Replies
Login or Register to Ask a Question