complicated alias command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting complicated alias command
# 1  
Old 04-19-2010
complicated alias command

hi guys
i m making one alias which will set variable , invoke sqlplus and also set prompt of sqlplus,,i have made successfully upto invoking sqlplus in unix but cant pass command in sqlplus
here is the command

alias sett='export ORACLE_SID=devdb2;sqlplus system/system@test'

now this command make me reach upto only into sqlplus

i want to set the prompt of sqlplus also ...can you tell me how to pass variable in this command and stay in sqlplus i dont want to just execute command in sqlplus and come out i want to stay in sqlplus .....

any suggestion please ....
# 2  
Old 04-19-2010
Quote:
Originally Posted by tapia
...
alias sett='export ORACLE_SID=devdb2;sqlplus system/system@test'

now this command make me reach upto only into sqlplus

i want to set the prompt of sqlplus also ...
any suggestion please ....
Here's a suggestion - set the sqlprompt in your glogin.sql or login.sql file.
And retain this alias.
That way your sqlplus program will pick up the value of sqlprompt automatically.

tyler_durden
# 3  
Old 04-19-2010
thanks a lot tyler,,, happy fight club Smilie
# 4  
Old 04-19-2010
Write a shell function instead..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Alias command help

Hello, I'm attempting to configure shell settings in my new Macbook. The standard unix command line 'alias' doesn't seem to be working: bash-3.2$ alias dir ls -la bash: alias: dir: not found bash: alias: ls: not found bash: alias: -la: not found bash-3.2$ alias dir 'ls -la' bash:... (1 Reply)
Discussion started by: palex
1 Replies

2. 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

3. Shell Programming and Scripting

complicated exclude option in find command

Hi all, In a directory, I have many video files. Example : As you can see, some of the video files come with a .aspx file (wich means the video is actually being uploaded and not entirely written on the FS) I try to write a bash script that would find all video files in the ... (1 Reply)
Discussion started by: gniagnia
1 Replies

4. Shell Programming and Scripting

Bash alias for complicated ls command does not work.

I'm trying to set up an alias in .bash_aliases to show just the filenames of the files in a directory, which the following command will do: ls -l | grep ^- | awk '{print $NF}' kjb.zip ap.zip tor.zip However when I set up the following alias in .bash_aliases: alias lf="ls -l | grep ^- |... (16 Replies)
Discussion started by: gencon
16 Replies

5. Linux

Complicated Join command!

Hi I have a serious issue when trying to join to files so I have two files, one for meals and one for people Meal1:Turkey:Potato Chips:Twinkie:Coke:5.95 Meal2:Ham & Cheese:Doritos:Cookie:Sprite:6.49 Meal3:Vegetarian:Cheese Crackers:Brownie:Pepsi:5.75 Meal4:Tuna:Cheese Puffs:Eclair:Diet... (1 Reply)
Discussion started by: ehshi1992
1 Replies

6. UNIX for Dummies Questions & Answers

alias command within .profile

Please could someone advise me the command - to set up aliases commands within a .profile using shell sh regards venhart (13 Replies)
Discussion started by: venhart
13 Replies

7. Shell Programming and Scripting

alias a simple ls -l command

how do I alias the following command: ls -l |egrep 'drw|dr-|d--|d-w' The alias command needs single quotes and so does the above command, so this does not work: alias LSDIR 'ls -l |egrep 'drw|dr-|d--|d-w' ' My problem is how do I get a listing of only directories? Solaris 8 SUN Ultra 10... (4 Replies)
Discussion started by: ajp7701
4 Replies

8. UNIX for Advanced & Expert Users

Alias a command

Hi 'm executing a java program from my shell script on solaris 9 as $JAVA_HOME\bin\java -ms32m -mx128m -classpath $CLASSPATH com.abc.fwk,abcServer.abcfwkServer $1 & where $1 is port number when i do ps -ef, it shows whole command , i want to give this some alias name as abcProcess, so... (2 Replies)
Discussion started by: b_garima
2 Replies

9. UNIX for Advanced & Expert Users

alias for rm command

Hi, i want to make alias for rm command. It should actually move the file to a directory in my home. Say if i type %rm abc.txt the command should expand to %mv abc.txt ~ashishp/trash How should I write the alias for this? -Ashish (8 Replies)
Discussion started by: shriashishpatil
8 Replies

10. UNIX for Dummies Questions & Answers

I want to create a command alias

I want to create a command alias. I know what shell I'm using, I just don't know which file to inter the command alias. When I type "echo $SHELL" the output is as follows: bin/sh If I'm correct, this is the bourne shell. Does anyone know which file to edit in this particular shell? Thanks. (2 Replies)
Discussion started by: cstovall
2 Replies
Login or Register to Ask a Question