Find does not return an error when no files are found. Testing the rc ($?) will not help very much.
The log file size will be zero when nothing is found, test that instead:
I am running Bash 4.x and find (find (GNU findutils) 4.4.2) does return exit code of 1 when the file is not found.
---------- Post updated at 09:10 PM ---------- Previous update was at 09:09 PM ----------
Quote:
Originally Posted by sv0081493
Hi,
Thanks a lot for your prompt response.
I want to understand the concept here for below commands and its use.Could you please help
if [ $? -ne 0 ]; then
$? contains the exit code of the previous run command. For a success, $? is 0 and for a fail $? is 1. However, there are some gotchas but that's the simple rule.
Hello People
I have the following file.csv:
date,string,float,number,boolean
20080303,abc,1.5,123,Y
20080304,abc,1.2,345,N
20080229,nvh,1.4,098,Y
20080319,ugy,1.9,586,N
20080315,gyh,2.4,345,Y
20080316,erf,3.1,932,N
I need to filter the date field where I have a data bigger than I... (1 Reply)
Hi
I have below file with 3 rd column as date ....i want to make 3 column to mm/dd/yyyy .
in the below file 2 row date is like 1/23/1994 so i want to append '0'
to month i,e. 01/23/1994 and in the 3 row date is like 6/4/1994 ---so i want this to 06/04/1994
Source:... (1 Reply)
I'm kinda new in shell scripting. How do i validate an input from a user to conform to requirement. For example,
echo "Enter First Name: "
read FName
echo "Enter Date of Employment (dd/mm/yyyy): "
read DoE
If the user enters data that is alphanumeric, it accepts it. I hope i've... (1 Reply)
Hi,
I am new to Unix shell scripting and need help to add some validation to an existing script.
I've made a script that takes two argument (input) but I want the script to display an error message when nothing (null) is entered. So far I managed to validate the fist argument but fail to... (2 Replies)
Hi All,
I need to write a small piece of code to check the following.
name should contain (A-Z), spaces, hyphens & apostrophes
I need to generate regular expressions for the same.
Please help me out as i am not familiar with regular expressions. (1 Reply)
Hey people, I got small little error which says I entered too many argument in the if else list.
The stock contains a list of information.
The 4th field consist of the quantity available, so I'm trying to alert the user that the stock is less than 3 and needed to restock.
Is this the correct way... (7 Replies)
Hi All
I am trying to validate a value using if condition
requirement is need to check whether its a valid numeric value
the input contains ( space, #N/A and negative and positive decimal values and Zeros)
if it contains the space, I need to display the error message as space
... (15 Replies)
HI,
i have to do some file validations on which i am receving daily.could any one please let me know how we can able to do validations on below scenarios
1) On Date column Ex If i am receving date in format of YYYYMMDD---- 20141118 --- here i have to check the date value 20141142 if the... (7 Replies)
Hi folks,
I new to shell script .
I want to know how to validate a String as valid date
example:
20150712 ---> valid date
20160524-->valid
201605T12-->invalid date
12341234--->invalid date
we need to valid string( yyyymmdd) to date in SunOS 5.10
please give some idea to validate... (9 Replies)
I am learning Shell scripting on own. I am trying to do an assignment to get details from the user like username their individual marks ,DOB and send a report in mail with the Details calculated like total and average.
validate_marks() {
local Value=$1
if &&
then
return 0
else... (1 Reply)
Discussion started by: JayashreeRobin
1 Replies
LEARN ABOUT CENTOS
gtester
GTESTER(1) User Commands GTESTER(1)NAME
gtester - test running utility
SYNOPSIS
gtester [OPTION...] [testprogram]
DESCRIPTION
gtester is a utility to run unit tests that have been written using the GLib test framework.
When called with the -o option, gtester writes an XML report of the test results, which can be converted into HTML using the gtester-report
utility.
OPTIONS -h, --help
print help and exit
-v, --version
print version information and exit
--g-fatal-warnings
make warnings fatal
-k, --keep-going
continue running after tests failed
-l
list paths of available test cases
-m=MODE
run test cases in MODE, which can be one of:
perf
run performance tests
slow, thorough
run slow tests, or repeat non-deterministic tests more often
quick
do not run slow or performance tests, or do extra repeats of non-deterministic tests (default)
undefined
run test cases that deliberately provoke checks or assertion failures, if implemented (default)
no-undefined
do not run test cases that deliberately provoke checks or assertion failures
-p=TESTPATH
only run test cases matching TESTPATH
-s=TESTPATH
skip test cases matching TESTPATH
--seed=SEEDSTRING
run all test cases with random number seed SEEDSTRING
-o=LOGFILE
write the test log to LOGFILE
-q, --quiet
suppress per test binary output
--verbose
report success per testcase
SEE ALSO gtester-report(1)GLibGTESTER(1)