$(echo "$tulos" | grep -o [^0-9a-z]e[^a-z0-9] ) -             testaa onko tulos-tekstijonossa "luonnollista e:tä".
$(echo $tulos | grep -o [-+.0-9]*e[-+0-9][0-9]*  | head -1) - etsii tulos-tekstijonosta tieteellisen esitystavan e:t parametreineen.

(( ${S[0]} || ${S[1]} )) && echo "true" || echo "false" # testaa onko jommankumman muuttujan totuusarvo 1 (=joku muu luku kuin 0) jolloin tulostuu:true . Muuten tulostuu false 
[[ ${S[0]} || ${S[1]} ]] && echo "true" || echo "false" # testaa onko muuttujissa jotakin ja nollakin on jotakin joten tulos pitääkin olla: true

testaa onko kyse numerosta: echo -0.13  | grep -P '^-?[e.0-9]+([0-9]+)?$' # tai pikemminkin: echo -0.1e3  | grep -P -- '[-+]?\b[e.0-9]+([0-9]+)?\b'

toinen tapa testata onko kyseessä numero: sana=-.1e2; case ${sana#-} in ''|*[!.e0-9]*) echo kyseessä ei ole numero ;; *) echo kyseessä on numero ;; esac


- tämmöistä kummallista ja hidasta menetelmää suosin, sillä vaikka kokonaislukujen löytämiseen regex on pätevä niin "edistyneempien" numeroiden metsästämisessä ne alkavat vuotaa ja niiden toiminnan paikkaaminen hidastaa niitä ja vievät ominaisuuksia.Eräs tieteellisessä esitysmuodossa olevan luvun regex:
echo -0.1e3  | grep -P '^[-+]?[.0-9]+([eE0-9]+)?'
- mutta se ei selviä kun luvussa on useampia desimaalipisteitä tai e-kirjaimia. Mitä kaikkea muuta kummallista siinä on? Eikä sen toiminnan paikattu muoto innosta:  
luku=-0.1E3E; echo $luku | grep -P  '^[-+]?[.0-9]+([eE0-9]+)?' | grep -v '\..*\.' | grep -v '[eE].*[eE]'

luku=-0.12E-3; echo $(echo $luku | grep -Po  '^[-+]?[.0-9]+[eE][-+]?\d+\b')


File tests
Operator syntax 	Description 	
-a <FILE> 	True if <FILE> exists. :!: (not recommended, may collide with -a for AND, see below) 	
-e <FILE> 	True if <FILE> exists. 	
-f <FILE> 	True, if <FILE> exists and is a regular file. 	
-d <FILE> 	True, if <FILE> exists and is a directory.
-c <FILE> 	True, if <FILE> exists and is a character special file. 	
-b <FILE> 	True, if <FILE> exists and is a block special file. 	
-p <FILE> 	True, if <FILE> exists and is a named pipe (FIFO). 	
-S <FILE> 	True, if <FILE> exists and is a socket file. 	
-L <FILE> 	True, if <FILE> exists and is a symbolic link. 	
-h <FILE> 	True, if <FILE> exists and is a symbolic link. 	
-g <FILE> 	True, if <FILE> exists and has sgid bit set. 	
-u <FILE> 	True, if <FILE> exists and has suid bit set. 	
-r <FILE> 	True, if <FILE> exists and is readable. 	
-w <FILE> 	True, if <FILE> exists and is writable. 	
-x <FILE> 	True, if <FILE> exists and is executable. 	
-s <FILE> 	True, if <FILE> exists and has size bigger than 0 (not empty). 	
-t <fd> 	True, if file descriptor <fd> is open and refers to a terminal. 	
<FILE1> -nt <FILE2> 	True, if <FILE1> is newer than <FILE2> (mtime). :!: 	
<FILE1> -ot <FILE2> 	True, if <FILE1> is older than <FILE2> (mtime). :!: 	
<FILE1> -ef <FILE2> 	True, if <FILE1> and <FILE2> refer to the same device and inode numbers. :!: 
	
String tests
Operator syntax	Description
-z <STRING>	True, if <STRING> is empty.
-n <STRING>	True, if <STRING> is not empty (this is the default operation).
<STRING1> = <STRING2>	True, if the strings are equal.
<STRING1> != <STRING2>	True, if the strings are not equal.
<STRING1> < <STRING2>	True if <STRING1> sorts before <STRING2> lexicographically (pure ASCII, not current locale!). Remember to escape! Use \<
<STRING1> > <STRING2>	True if <STRING1> sorts after <STRING2> lexicographically (pure ASCII, not current locale!). Remember to escape! Use \>

Arithmetic tests
Operator syntax	Description
<INTEGER1> -eq <INTEGER2>	True, if the integers are equal.
<INTEGER1> -ne <INTEGER2>	True, if the integers are NOT equal.
<INTEGER1> -le <INTEGER2>	True, if the first integer is less than or equal second one.
<INTEGER1> -ge <INTEGER2>	True, if the first integer is greater than or equal second one.
<INTEGER1> -lt <INTEGER2>	True, if the first integer is less than second one.
<INTEGER1> -gt <INTEGER2>	True, if the first integer is greater than second one.

Misc syntax
Operator syntax 	Description
<TEST1> -a <TEST2> 	True, if <TEST1> and <TEST2> are true (AND). Note that -a also may be used as a file test (see above)
<TEST1> -o <TEST2> 	True, if either <TEST1> or <TEST2> is true (OR).
! <TEST> 	True, if <TEST> is false (NOT).
( <TEST> ) 	Group a test (for precedence). Attention: In normal shell-usage, the "(" and ")" must be escaped; use "\(" and "\)"!
-o <OPTION_NAME> 	True, if the shell option <OPTION_NAME> is set.
-v <VARIABLENAME> 	True if the variable <VARIABLENAME> has been set. Use var[n] for array elements.
-R <VARIABLENAME> 	True if the variable <VARIABLENAME> has been set and is a nameref variable (since 4.3-alpha) 


 
