Hi All,
I am checking for a empty input file to do some further action , but I am getting exit status 0 in both the cases , for empty and non empty file both.
The value of $? is coming 0 in if part also and else part too.
#!/bin/ksh
if ]; then
echo "data"
# exit 0
echo "$?"
else... (4 Replies)
Hi,
I created the following shell script to lookup multiple name servers for a domain.
#!/bin/bash
echo -n "Enter the domain name and press : "
read domain
result1=`dig +short $domain @4.2.2.1`
revresult1=`host $result1 | cut -f5 -d " "`
echo "test1"
result2=`dig +short... (3 Replies)
So, I will be working with someone and basically we are trying to build a form that is submitted most likely via the web and the data is just a string of numbers.
like:
19383882872201110929282821818182827349190102837364718191001932873711
Now, each number is part of a numerical value of... (4 Replies)
I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
I'm trying to write a shell script to files of zero length in a specified directory, but I keep getting errors. Would anybody be kind enough to look it over for issues? Thanks a bunch in advance.
#!/bin/sh
if
then
if
then
find $1 -type f -size 0 -print|xargs rm
exit 0... (1 Reply)
I have a script that runs ditto for me, and occasionally (if I exit the script while ditto is running in the background) it will leave an empty file named 0 in the script's directory. The next time I run the script, it generates incorrect data because of this file. I know I can easily insert a... (1 Reply)
I have a script that runs ditto for me, and occasionally (if I exit the script while ditto is running in the background) it will leave an empty file named 0 in the script's directory. The next time I run the script, it generates incorrect data because of this file. I know I can easily insert a... (1 Reply)
Hi,
I am unable to get $HOSTNAME value in a remote script when executed through SSH. Also the scripts hangs and doesnt return to the calling environment.
For instance
command -
ssh user1@box2 "cd /var/home/bin ; ./generateScript.sh"
Can any one plese throw light on the issue and... (5 Replies)
Hi All,
Can anyone please write a shell script to remove the empty files using an if condition.
please help me out , urgent
thanks (6 Replies)
Discussion started by: muthi_murali
6 Replies
LEARN ABOUT DEBIAN
mintegrate
MINTEGRATE(1) User Commands MINTEGRATE(1)NAME
mintegrate - evaluate average/sum/integral/derivative of 1-d numerical data
SYNOPSIS
mintegrate [OPTION]... [FILE]
DESCRIPTION
mintegrate is a program to compute averages, sums, integrals or derivatives of numerical 1-d data in situations where ultimate numerical
precision is not needed.
OPTIONS -a compute mean value (arithmetic average) and standard deviation
-c compute integral on closed x-data interval; In case that dx is not specified by the '-d' flag, the data are supposed to be from an
irregular x-grid, and dx is computed separately for every x-interval. The integral is computed by the trapezoidal rule.
-d <float>
compute integral on open x-data interval with the specified dx; Can be used also in combination with '-D' and '-c'.
-D compute difference btw. numbers or derivative of the y-data; In the default scenario where x- and y-data column are same, the dif-
ference btw. the current and the previous data value will be output. In this case when '-d' is defined as 0, the x-data value will
be print out in front of the calculated difference. If x-and the y-column are different and if the x-data resolution is not defined
or it is !=0, then the derivative of the y-data is calculated. When the x-data resolution is constant, specify it explicitly by '-d'
to achieve a higher numerical precision by a 'leapfrog' algorithm.
-x <int>
x-data column (default is 1). If 0, the x-range is an index;
-y <int>
y-data column, where y=f(x) (default is 1)
-r x_0:x_1
x-data range to consider
-s print out accumulated y_i sums: x_i versus accumulated f(x_i); In the case of a closed integral you have to specify also the x-data
resolution dx (see '-d' above).
-S compute the accumulated y_i-sums and add it to the output
-p <str>
print format of the result ("%.10g" is default)
-t <str>
output text in front of the result (invalid with '-s' or '-S'); A blank can be printed by using a double underscore character '__'.
-T run a self-test that the program is working correctly
-V print version number
--version
output version and license message
--help|-H
display help
-h display short help (options summary)
If none of the options '-a', '-D', '-d', or '-c' is used, then the sum of the provided data will be computed. Empty lines or lines starting
with '#' are skipped.
This program is perfectly suitable as a basic tool for initial data analysis and will meet the expected accuracy of a numerical solution
for the most demanding computer users and professionals. Yet be aware that, although the computations are carried with double floating pre-
cision, the computational techniques used for evaluating an integral or a standard deviation are analytically low-order approximations, and
thus not intended to be used for numerical computations in engineering or mathematical sciences for cases where an ultimate numerical pre-
cision is a must. For deeper understanding of the topic see http://en.wikipedia.org/wiki/Numerical_analysis.
COPYRIGHT
Copyright (C) 1997, 2001, 2006-2007, 2009, 2011-2012 Dimitar Ivanov
License: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
mintegrate 2.2.1 February 2012 MINTEGRATE(1)