10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a variable I want to use in bash script. The user will pass an argument
to the script and I will store it in `arg_fql`. If the user does not pass the variable,
I still never set arg_fql, but I set another variable to a default. However, if the user
passes a value, `arg_fql` will be set to... (2 Replies)
Discussion started by: kristinu
2 Replies
2. Shell Programming and Scripting
Hello,
I'd like to have an alias to view some processes sorted:
I have:ps -ef | grep pmon | awk -F" " '{ print $8" "$0 }' | sort | cut -d" " -f2- | grep -v "grep pmon" It doesn't work, however, if I put it as alias because on acutes insize awk:alias pmon='ps -ef | grep pmon | awk -F" " '{ print... (4 Replies)
Discussion started by: JackK
4 Replies
3. Shell Programming and Scripting
Hi all,
I want to dynamically set variables in a bash script. I made a naive attempt in a while loop that hopefully can clarify the idea.
n=0; echo "$lst" | while read p; do n=$(($n+1)); p"$n"="$p"; done
The error message is:
bash: p1=line1: command not found
bash: p2=line2: command... (8 Replies)
Discussion started by: jeppe83
8 Replies
4. Shell Programming and Scripting
I want to set an alias to connect to sqlplus and also run a command while it it logs in.
How can I do that? (4 Replies)
Discussion started by: som.nitk
4 Replies
5. UNIX for Dummies Questions & Answers
I tried to set up some alias in my .profile to save typing. One of the alais i tried to set up is
alais test='echo 123$acct54679abc'
But when I typed in test in the command line. The echo only dispaly 123 and truncated all the string starting from the $ sign. Is there any way to display the... (6 Replies)
Discussion started by: oht
6 Replies
6. UNIX for Dummies Questions & Answers
Hi.
I use an alias, "homeperm" as shorthand for curl -o. Since most of what I download via cUrl is graphic image files -- jpeg files -- I'd like to be able to change this alias to a script, or use it to invoke a function, which will not only download the file but date-stamp it using Exiv2 in... (4 Replies)
Discussion started by: SilversleevesX
4 Replies
7. UNIX for Dummies Questions & Answers
Hi Guys,
I would like with this script
"DATA=`ora123 su -c 'echo "SET HEADING OFF;\n SET FEED OFF;\n select USER NAME, ACCOUNT_STATUS from dba_users;\n exit" | sqlplus / as sysdba -s /' `
echo $DATA >> $DAT"
make a sql query, but the statement
"select USER NAME, ACCOUNT_STATUS from... (6 Replies)
Discussion started by: ixibits
6 Replies
8. Shell Programming and Scripting
Hi
i have a user "SYSTEM"
i want to set the below command in his .profile for an alias:
who | awk '{print $1}'| sed '/SYSTEM/d' | sed '/root/d' |xargs -i pkill -u {}
i tried as below:
alias stop = " who | awk '{print $1}'| sed '/SYSTEM/d' | sed '/root/d' |xargs -i pkill -u {}"
... (3 Replies)
Discussion started by: joycesolomon
3 Replies
9. Solaris
Hi All,
I need some information on 'Alias' setting in SUN SOLARIS.:confused:
Q1. I want to know how can i set my alias here.
Q2. How to view all set 'ALIAS' for me. (say /home/jdash user)
Q3. Can i modify the set 'Alias' for me or for whole environment.
Q4. Is Alias setting can be change... (2 Replies)
Discussion started by: jdash.ps
2 Replies
10. Red Hat
Hi Everyone,
I am trying to set up alias the only way I now how, buy making entry into .bashrc file.
The entry I made is
alias ll='ls -lrt'
It is not working as I expect. When I enter "alias" at the command line I get the following.
$ alias
alias l.='ls -d .* --color=tty'
alias... (2 Replies)
Discussion started by: jxh461
2 Replies