On Friday 17 February 2006 05:23, N Gandhi Raja wrote: > I want to compare a variable holding *string* with the *regular > expression *. Is it possible to do in unix with a single command? > Can we use "test" command in UNIX to compare a *string *with the > *regular expression*? if so please provide an example for that.
`test` does not support regexes, but you can use either `expr` or bash-3.0+ supports regex comparison using the =~ operator -mike _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils