10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I need to read values of 10 columns from oracle query and assign the same to 10 unix variables. The query will return only one record(row).
I tried to append all these columns using a delimiter(;) in the select query and assign the same to a single variable(V) in unix. I thought I... (3 Replies)
Discussion started by: hkrishnan91
3 Replies
2. Shell Programming and Scripting
Hello,
I would like to ask for help with csh script.
An example of an input in .txt file is below, the number of lines varies from file to file and I have 2 or 3 columns with values. I would like to read all the values (probably one by one) and set them to independent unique variables that... (7 Replies)
Discussion started by: FMMOLA
7 Replies
3. Shell Programming and Scripting
Hi All,
i have a requirement where i have to run a script with at least 25 arguements and position of arguements can also change. the unapropriate way is like below. can we achieve this in more good and precise way??
#!/bin/ksh
##script is sample.ksh
age=$1
gender=$2
class=$3
.
.
.... (3 Replies)
Discussion started by: Lakshman_Gupta
3 Replies
4. Shell Programming and Scripting
Hi I'm looking to take a user input and use it to effect just two characters in a command rather than having multiple functions for each one.
function baseencode() {
echo "This function handles the following: $YELLOW base64 base32 base16 $NORMAL"
echo "$GREEN Select 64 32 or 16 $NORMAL"... (2 Replies)
Discussion started by: 3therk1ll
2 Replies
5. Shell Programming and Scripting
Hi script gurus.
I have need to know how to use for loop with multiple variable.
Basically lets take for example /etc/passwd file has following entries
The above cat command will basically first greps the real users that have email addresses then converts ':' to '+' then using cut... (4 Replies)
Discussion started by: sparcguy
4 Replies
6. Shell Programming and Scripting
Guys anyone know how i can store fields into multiple variables in one go?
I'm wanting to grab the disk id's from format into disk1 and disk2
Below is what i want to work but i know it doesnt :-
: | format | awk '/^(\ +)/ {print $2}' | read disk1 disk2
The below does work...but i don't... (5 Replies)
Discussion started by: lavascript
5 Replies
7. Shell Programming and Scripting
Hi!
I've come up with a ksh-script that produces one or more lists of hosts.
At the and of the script, I would like to print only those hosts that exists in all the lists.
Ex.
HOSTS="host1 host2 host3 host11"
HOSTS="host1 host2 host4"
HOSTS="host2 host11"
HOSTS="host2 host5 host6 host7... (1 Reply)
Discussion started by: Bugenhagen
1 Replies
8. UNIX for Dummies Questions & Answers
hi,
I want an equivalent for loop for this C code in unix shell script...
for(int i,int j;i<5;i++,j++)
{
}
Please reply soon
Regards
Navjot (1 Reply)
Discussion started by: navjotsingh
1 Replies
9. Shell Programming and Scripting
I have the following bit of code
FOUND_SEC=`ls -ld $NAME 2>/dev/null|awk '{print $1}'`
FOUND_USER_NAME=`ls -ld $NAME 2>/dev/null|awk '{print $3}'`
FOUND_GROUP=`ls -ld $NAME 2>/dev/null|awk '{print $4}'`
is there a better way to write it to get the same result as it seems... (2 Replies)
Discussion started by: sjday
2 Replies
10. Shell Programming and Scripting
I have a script which selects two 'sets' of system LVM device files from a tabular file 'mapfile' using awk :
LIVELV=`awk '{print($1)}' mapfile`
BCVLV=`awk '{print($3)}' mapfile`
I wanted to pass these 'sets' into an LVM command 'loop' along the lines of :
lvmerge $BCVLV $LIVELV
ie.... (3 Replies)
Discussion started by: fosterian
3 Replies