10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I want get from user and pass these parameters to bash script. script should copy files in user home directory.
FYI: each file might be exist or not, might be one of them exist or four of them.
Here is my script, it always copy file1 and seems only one of them execute!
#!/bin/bash
for... (6 Replies)
Discussion started by: indeed_1
6 Replies
2. Shell Programming and Scripting
I wrote a code to find codons in a DNA string. The only problem I have is how do I make the code only work for a file with DNA. This means the file only has the characters a,c,g,t and no white space characters. (3 Replies)
Discussion started by: germany1517
3 Replies
3. Shell Programming and Scripting
issue is with .txt files (7 Replies)
Discussion started by: anil529
7 Replies
4. Shell Programming and Scripting
In the below I can not seem to add a line that will add Not low if the statement in bold is not true or meet. I guess when the first if statement is true/meet then print low, otherwise print Not low in $(NF + 1). I am not sure how to correctly add this. Thank you :).
if(low <= $2 && $2 <=... (5 Replies)
Discussion started by: cmccabe
5 Replies
5. UNIX for Dummies Questions & Answers
In AIX, why is it variable VAR becomes true in the condition despite VAR was unassigned and not equal to 1?
In Linux, it was traced as an error as VAR is not declared as variable and expecting an integer as argument.
one.sh
VAR=1
if ; then
echo "One"
fi
if ; then
echo "Two"... (5 Replies)
Discussion started by: budz26
5 Replies
6. Shell Programming and Scripting
Hello
newbies question...
I just need a script able to launch a command when a condition is matched :
#!/bin/ksh
SIZ = 'cat /nurp/control.lst|wc -l'
if test "$SIZ" -gt 0
then
echo 1
else
echo 2
fi
but I receive errors messages
./t2: SIZ: not found
2
whats wrong ? (5 Replies)
Discussion started by: vdurieu
5 Replies
7. Shell Programming and Scripting
Please help me with this:
I need to compare two values in if condition in shell script but its goes always to else condition:
TIME_CHECK=PM
TIME-CLOCK=PM
if ; then
echo "You have access!"
else
echo "ACCESS DENIED!"
fi (5 Replies)
Discussion started by: aroragaurav.84
5 Replies
8. Red Hat
Urgent help with bash scripting
1- i am using grep to find a string called: tinker panic 0 in a file /etc/ntp.conf
if the string is not there, i want to add the strings in /etc/ntp.conf file in the first line of the file. if not do nothing or exit.
2- also i want to add # in front of the... (2 Replies)
Discussion started by: lamoul
2 Replies
9. Programming
Hi, I have meaning to include an if condition statement in my code to check the directory for existing output files and if its existing i want the program to delete it before doing the succeeding command. i just dont know the correct syntax for it. thanks much guys, this forum has indeed been very... (4 Replies)
Discussion started by: ida1215
4 Replies
10. Shell Programming and Scripting
Hi All,
I am trying to check if two variables have value assigned to it.
i am doing it like
if ]
then
echo "Please specify either single hostname or host file for the report"
usage
exit
fi
But its not working for it.Even i specify values for both variables it dont go... (6 Replies)
Discussion started by: kailash19
6 Replies