Search Results

Search: Posts Made By: booghaw
7,162
Posted By dude2cool
your issue is "$any_key" = "x|X" it is...
your issue is
"$any_key" = "x|X"

it is taking your key say example you pressed x and comparing with "x|X" :)...you need to use use || to compare two values with if.

if [ ${any_key} = "x" ] ||...
7,162
Posted By yazu
Neither "X|x" nor just X|x are valid syntax for...
Neither "X|x" nor just X|x are valid syntax for using with test ( [...] ) command. For this there is the "case" statement. Use
if [ "$any_key" = x ] || [ "$any_key" = X ]
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 04:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy