9 More Discussions You Might Find Interesting
1. Solaris
i am trying to assign the following expression to a variable in Unix shell script
and want to use that variable in some other expression. But unable to get the required thing done. Please help with this....
This is the expression which i want to provide as input the variable
date '+%y:%m:%d' |... (3 Replies)
Discussion started by: ssk250
3 Replies
2. Shell Programming and Scripting
Hello,
Need a small help to execute below script.
#!/bin/bash
. new.txt
for no in 3 4
do
echo $((uname_$no))
done
new.txt contains
uname_1="XXXXXX"
uname_2="YYYYY"
uname_3="ZZZZZ"
......... (6 Replies)
Discussion started by: prasanna2166
6 Replies
3. Shell Programming and Scripting
Hi,
I have this code:
cat file.txt | awk -F, 'NR==1{print $6","$8","$10","$20","$21","$19}' > file.tmp
VAR1=`cat file.tmp | cut -d "," -f1`
VAR2=`cat file.tmp | cut -d "," -f2`
VAR3=`cat file.tmp | cut -d "," -f3`;
VAR4=`cat file.tmp | cut -d "," -f4`;
VAR5=`cat... (1 Reply)
Discussion started by: Tr0cken
1 Replies
4. Shell Programming and Scripting
there are two variables from a select query and these two variables has to assign in a update query . the two variables are two fields. How to assign without splitting by awk? (7 Replies)
Discussion started by: razen
7 Replies
5. UNIX for Dummies Questions & Answers
Okay, I've made threads on extracting fields and comparing strings in separate files in .csv's. I've written the following code with intentions of learning more.
I just want this one question answered: How can I assign fields from a file(comma separated) to variables?
My goal is to check... (0 Replies)
Discussion started by: chickeneaterguy
0 Replies
6. Shell Programming and Scripting
First, this is bash (3.2.17), on a Mac, 10.5.7.
What I'm trying to do is look at a list of users, and check to see if each exists. If they do, do some more stuff, if they don't, drop them into an error file.
So, my user list is:
foo - exists
bar - does not exist
blah - does not exist
... (2 Replies)
Discussion started by: staze
2 Replies
7. Shell Programming and Scripting
hi,
I want to assign find command result into some temporary variable:
jarPath= find /opt/lotus/notes/ -name $jarFile
cho "the jar path $jarPath"
where jarPath is temporary variable.
Can anybody help on this.
Thanks in advance
----Sankar (6 Replies)
Discussion started by: sankar reddy
6 Replies
8. Shell Programming and Scripting
I have the sql file cde.sql with the below contents:
abcdefghij
abcwhendefothers
sdfghj
when no one else
when others
wwhen%others
exception when others
Now I want to search for the strings containing when others together and ceck whether that does not occur more than once in the... (2 Replies)
Discussion started by: kprattip
2 Replies
9. Shell Programming and Scripting
I'm confused as to how to handle floating point numbers in shell scripts. Is there a way to convert a number (string) read into a shell variable so that it can be used as a floating point decimal for calculation purposes? Or am I stuck with integrating C or Perl into my script?
Ex:
--input
... (3 Replies)
Discussion started by: spieterman
3 Replies