9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
Seeking for your assistance on how to condition it correctly.
cat file1.txt
290,1663,43,888,0,0.00,86.91,0.00,26.98,0.00
290,1663,52,0,0,0.00,0.00,0.00,0.00,0.00
290,1663,52,888,0,0.00,34.60,0.00,9.00,0.00
1st scenario:
if the fourth column contains 888s and 0s it is by... (16 Replies)
Discussion started by: znesotomayor
16 Replies
2. Shell Programming and Scripting
Hi All,
I am using below if condition to check whether null is passed as a parameter to the program
if or ;
then
echo "ABC">>$FILE
else
echo "CDF">>$FILE
fi
However it is saying me null=null command not found . Please help me with this (9 Replies)
Discussion started by: Hypesslearner
9 Replies
3. Shell Programming and Scripting
Hello All,
I am in the process of learning perl.I have a perl script and based on the arguments passed it would the appropriate subroutine that is defined in the script.
Now, I need to check a value that is defined in the Environment variables and should call the subroutine only if the... (1 Reply)
Discussion started by: filter
1 Replies
4. Shell Programming and Scripting
Hi All,
I'm a newbie here, I'm just wondering how can i disable my 1st sed command if there's no file found on Yes_Directory and process instead the No_Directory because there's a file found on it.
Yes_Directory="/home/yes/
No_Directory="home/no/
script:
if ; then
sed -i... (8 Replies)
Discussion started by: nikki1200
8 Replies
5. Shell Programming and Scripting
Hello,
I want to check if all element of an array have the same value regardless the length of the array.
example:
@array1 = qw(44 44 44 44);
@array2 = qw(55 55 55 55 55 55 55);
Please advice,
Ahmed (11 Replies)
Discussion started by: ahmed_zaher
11 Replies
6. Shell Programming and Scripting
Hi,
I need to use if condition for search a file pattern on a particular location.
cd $file_Path
if ||
then
do this
else
do that
fi
Can someone help me with the if part, how i can put those conditions?
make sure format should be *.file* and *.file
file is a keyword which i... (5 Replies)
Discussion started by: amit.mathur08
5 Replies
7. Shell Programming and Scripting
#!/usr/bin/perl
$output1 = "/home/log.txt"
$output2 = "/home/grep.txt"
#Statement1 creates an output file called log.txt.
#Statement2 greps a line from log.txt and store the result in grep.txt
I want to create a condition where if the file grep.txt is empty repeat process.
Thanks. (1 Reply)
Discussion started by: sureshcisco
1 Replies
8. Shell Programming and Scripting
Hi ,
I am trying the following simple script . But it is always giving 1 output. Dont know why
#!/bin/sh
find . -name "a.log"
if ; then
echo "1"
else
echo "0"
fi
Kindly advice. it is giving 1 output even when the a.log file is not there (26 Replies)
Discussion started by: himvat
26 Replies
9. Shell Programming and Scripting
hi, :)
pls consider the following if statement
if //g') ]
then
........
else
.......
when i execute the script i am getting the following error
'(' unexpected
I am not able to find the mistake.
could anybody tell where i did mistake.
cheers
RRK (13 Replies)
Discussion started by: ravi raj kumar
13 Replies