10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts
I would like to ask if there is a way to validate if the variable passed is in this kind of sample format "06-10" or "10-01". It was really a challenge to me on how to start and echnically the "6-10" stands for "June 10" and "10-01" stands as "October 1", overall it needs to have ... (3 Replies)
Discussion started by: ersan-poguita
3 Replies
2. 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
3. Shell Programming and Scripting
Hi All,
I am really struggling to solve this problem, this might be small but I am not able to, can somebody help me?
I have few directories and these directories receives text files in large amount with in fraction of seconds. So I just want to send all the files in current directory to... (2 Replies)
Discussion started by: VasuKukkapalli
2 Replies
4. UNIX for Dummies Questions & Answers
I am trying to compare the floating number variables but i am receiving an error, can you please help what is wrong. Thank you.
#!/bin/bash
var1=100.25
var2=100.25
if (( $var1 == $var2 )); then
echo "Matching"
else
echo "Not Matching"
fi
Error:
./number.sh: line... (6 Replies)
Discussion started by: Ariean
6 Replies
5. Shell Programming and Scripting
How do I assign values to reference variables?
I am assigning a variable name to --> $user_var
Then I am trying to change its underlying variable value by
$((user_var))=$user_value .. its failing,,
Please let me know if there is a way to do this dynamically..
FileA.props... (5 Replies)
Discussion started by: kchinnam
5 Replies
6. Shell Programming and Scripting
Hey all, I was wondering if someone would take a look at this script I'm working on. I don't know if i have the syntax correct for my variables and if the for loop is written correctly.
any assistance would be greatly appreciated.
#!/usr/bin/bash
###########################################... (12 Replies)
Discussion started by: em23
12 Replies
7. Shell Programming and Scripting
Hi Gurus,
I have a requirement of writting the shell script where it should ask me two values
FND_TOP=/d02/app/oracle/xxx/fnd/11.5.0
CDCRM_TOP=/d02/app/oracle/xxx/cdcrm/11.5.0
and then keep these values stored as variables for the execution of rest of the script.
Because, I have to... (2 Replies)
Discussion started by: isingh786
2 Replies
8. UNIX for Dummies Questions & Answers
I'm trying to define a variable named sin
I already have a variable named cos, which has the value "hello"
I want sin to have the value of "hellothere",
so sin would be something like
sin = $cos & "there"
but I'm not sure that I know the syntax.
Can anyone help?
:confused: (4 Replies)
Discussion started by: sailorliones
4 Replies
9. UNIX for Dummies Questions & Answers
I am writing a script that needs to accept numbers into a variable by prompting and using the code
read num
case $num in
000)
break
;;
*)
I am fairly new to unix and am loving the versatility of the language but need a little shove in the right... (1 Reply)
Discussion started by: noobian
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I'm looking for advice on where is the best place on Solaris to put a script that will setup system vairables prior to any users loging in. I've tried /etc/rc3.d without much success as the variables do not appear in the output from an env command.
I want the system to have these... (7 Replies)
Discussion started by: ianf
7 Replies