9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a sample server name listed in variable as below:
I need to check if the 7th character on $var is number 1
whichenv=`echo "$var"| head -c 7 | tail -c 1`
if ]; then
echo "9 found"
echo "9 Not Found"
This works... (3 Replies)
Discussion started by: mohtashims
2. UNIX for Dummies Questions & Answers
Im new in unix, I learned some commands, I have a small idea in MS Dos
Would you like to advise me where and how to start ? (2 Replies)
Discussion started by: BaxxterHp
3. Shell Programming and Scripting
if above back_home does not exist, then script shoul exit. Please let us know how to do that (7 Replies)
Discussion started by: buzzme
4. Shell Programming and Scripting
My doubt may be basic one but I need to get it clarified..
When i use "if" condition that checks for many AND, OR logical conditions
if ]; then
Even the if condition fails it returns as zero.. Any clue..
But if i add else condition like
if ]; ... (2 Replies)
Discussion started by: Priya Amaresh
5. Shell Programming and Scripting
I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command
Here are my simple script
After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
Discussion started by: jao_madn
Executed the following if conditions .. and got different results .
only (( )) gave correct o/p with all scenarios .
Can anybody please let me know what is the difference between and ] and ((condition)) when used with if condition.
And why each condition gave different result.
1.... (2 Replies)
Discussion started by: soumyabubun
7. Shell Programming and Scripting
After my if condtion give rusult true then script should stop execution.
Please advice...Thnaks in advance (1 Reply)
Discussion started by: vivek1489
I have a question, and would like some advice please. I am a windows guy by trade....5 years in the Marines is where I learnt a lot of what i know. I took a junior level sys admin job...learned a bit more...and now I do IT security. All of this happened in the last 8 years. So I'm 27... (2 Replies)
Discussion started by: Quality
9. UNIX for Dummies Questions & Answers
I'm trying to figure out how to build a small shell script that will find old .shtml files in every /tgp/ directory on the server and delete them if they are older than 10 days...
The structure of the paths are like this:
/home/domains/www.domain3.com/tgp/... (1 Reply)
Discussion started by: Neko