Hi! I'm using
echo $string | grep "" -c
to test in a script if a string is a number and it seems to work. But how can i find, for example, if a string is a four figures number ?
Thanks to all! (2 Replies)
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
How do I test multiple words in a string test like below:
if ]
then
print "You entered $TBS name.\n"
else
print "You entered an incorrect response.\n"
fi
This test does not work. I have tried different syntax versions. How does this work? And is there a better way to do it?
... (10 Replies)
Hi guys
I am performing a simple test for a blank string with the following code:
if ] ]] ; then
echo "Blanks are NOT a valid input "
return 1
fi
The above fails giving a syntax error message:
syntax error at line 142 : `=~' unexpected
I am in ksh88
is there... (2 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
I want to find whether string values are available in a field of a file. Let it be any character other than number . I just want to know whether characters will be available in it . Please share a single step command for this without creating a shell script. (5 Replies)
Discussion started by: Sang
5 Replies
LEARN ABOUT DEBIAN
ocamlify
OCAMLIFY(1) General Commands Manual OCAMLIFY(1)NAME
ocamlify - create an OCaml file including other files.
SYNOPSIS
ocamlify [options] option-file
DESCRIPTION
This program allows to copy files inside OCaml code. It uses a first file that describes the other files that must be included and the
type of OCaml variable it should create. It can also describe dependencies to other files, in order to generate .depends files for make.
For example, we can create a file test.mlify with this content:
VarString oasissys_ml "OASISSys.ml"
VarStringList readme_template_mkd "MANUAL-template.mkd"
We then translate it using the program:
$> ocamlify --output test.ml test.mlify
And we get a file test.ml containing two OCaml variables: oasissys_ml, which is a string, and readme_template_mkd which is a string list
(one string per line).
OPTIONS --var-string-list varname file
Include file as a list of string, each string representing a line (without trailing EOL character)
--var-string varname file
Include file as a string.
--output file
Output file, default to standard output
--depends
Output file dependencies
--target file
Define target of dependencies
-help|--help
Display list of options
AUTHORS
Sylvain Le Gall.
Ocamlify User Manual November 9, 2010 OCAMLIFY(1)