Subject: string processing (was: text processing tool)
To: None <Netbsd-help@netbsd.org>
From: Lubos Vrbka <shnek@chemi.muni.cz>
List: netbsd-help
Date: 03/13/2003 19:49:43
thanks charles,
the rs(1) seems to be the right choice for me! :o)
one more question - if i read empty string into a variable in a script
(/bin/ksh) (i.e. user just hits enter) and i want to test the variable,
i always get an error message (the same applies to space and probably
other white characters)
read variable
if [ $variable = "abc" ]
then
...
fi
produces
[: abc: unexpected operator
if [ $variable = "" ]
or
if [ $variable = " " ]
works fine... so how do i tell the system that empty string (or
space-filled string) is ok? man test doesn't tell me anything :o(
regards,
lubos
--
-
#################################################
Lubos Vrbka
National Centre for Biomolecular Research
Masaryk university, Brno, Czech Republic
shnek@chemi.muni.cz
http://www.chemi.muni.cz/~shnek
tel. +420 541 129 508
#################################################