You are assingning pdp_asaba, pdp_abuja, and pdp_ojota, but you are testing always the same $pdp variable, that may be set outside the snippet posted. Is that what you want to do?
And, your entire cat | grep | sed pipe organ could be replaced by e.g.
Hi Folks,
I'm using bash script. I would like to check whether input is a number or not.(Only positive numbers).. if space or non numeric is entered, it should say "invalid input". pls help..
thanks in adv.
Br///
Vijay. (1 Reply)
Hi All,
How do i modify the below script such that if the input is numeric, it will give the numeric digit, else it will ouput "0"
echo "xxx" | awk '/^+$/' (6 Replies)
Hi
how to check input is "empty" and "numeric" in ksh?
e.g:
./myscript.ksh k
output show: invalid number input
./myscript.ksh
output show: no input
./myscript.ksh 10
output show: input is numeric (6 Replies)
Below is the abstract of the script which is working fine.
if ]
then
error_process "Invalid month format."
return 1
fi
I am doing validation for month and it errors if the value is > 12 or < 0. In addition, I want to add another condition to error if it... (2 Replies)
i have a input file like this
001|rahim|bajaj|20090102
while reading the file i need to check whether the first column is a number
second column is a name
is there any methodology to check for the same
thanks in advance (2 Replies)
Hi,
how to check the given string is numeric or not , without converting ( using strtol...).
for ex: if string is C01 - non-numeric data
if string is 001 - numeric data
TIA (11 Replies)
Hi, I'm trying to check to see that the arguments given to my script are both numeric and positive integers. I'm using tcsh. I figured out the positive part, but I am having trouble with the arguments being numeric and integers
I have no idea where to get started with the checking them actually... (1 Reply)
Using shell,
I have a variable, how can I check that variable for a numeric value such as "41.0"? My program needs to do one things if the numeric value is found, and another if something else such as a string of letter is found. is there a specific character that denotes a numeral? The... (2 Replies)
Hi
I need to put the validation in batch script when user will enter the build number it should be numeric.I can put the validation for numeric values but there is .(dot) in number so it would not take it as numeric.
Is it possible we can store it in variable and remove the .(dot) from the... (1 Reply)
Discussion started by: anuragpgtgerman
1 Replies
LEARN ABOUT DEBIAN
unbuffer
UNBUFFER(1) General Commands Manual UNBUFFER(1)NAME
unbuffer - unbuffer output
SYNOPSIS
unbuffer program [ args ]
INTRODUCTION
unbuffer disables the output buffering that occurs when program output is redirected from non-interactive programs. For example, suppose
you are watching the output from a fifo by running it through od and then more.
od -c /tmp/fifo | more
You will not see anything until a full page of output has been produced.
You can disable this automatic buffering as follows:
unbuffer od -c /tmp/fifo | more
Normally, unbuffer does not read from stdin. This simplifies use of unbuffer in some situations. To use unbuffer in a pipeline, use the
-p flag. Example:
process1 | unbuffer -p process2 | process3
CAVEATS
unbuffer -p may appear to work incorrectly if a process feeding input to unbuffer exits. Consider:
process1 | unbuffer -p process2 | process3
If process1 exits, process2 may not yet have finished. It is impossible for unbuffer to know long to wait for process2 and process2 may
not ever finish, for example, if it is a filter. For expediency, unbuffer simply exits when it encounters an EOF from either its input or
process2.
In order to have a version of unbuffer that worked in all situations, an oracle would be necessary. If you want an application-specific
solution, workarounds or hand-coded Expect may be more suitable. For example, the following example shows how to allow grep to finish pro-
cessing when the cat before it finishes first. Using cat to feed grep would never require unbuffer in real life. It is merely a place-
holder for some imaginary process that may or may not finish. Similarly, the final cat at the end of the pipeline is also a placeholder
for another process.
$ cat /tmp/abcdef.log | grep abc | cat
abcdef
xxxabc defxxx
$ cat /tmp/abcdef.log | unbuffer grep abc | cat
$ (cat /tmp/abcdef.log ; sleep 1) | unbuffer grep abc | cat
abcdef
xxxabc defxxx
$
BUGS
The man page is longer than the program.
SEE ALSO
"Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs" by Don Libes, O'Reilly and Associates, January 1995.
AUTHOR
Don Libes, National Institute of Standards and Technology
1 June 1994 UNBUFFER(1)