tombstone
31st May 2006, 19:37
Fairly new to bash scripting and I'm having a hard time wrapping my head around this one.
Lets say I have 2 variables
user and db
db='username_blah'
user='username'
how would I compare those 2 saying
if user=beginning of db(everything before the_) ;
then
code here
fi
sometimes I'l have db be somethin_blah
and username will be 'something' (minus the last letter or letters) how would I do the same thing there
hope I was clear enough
help would be appreciated
Tombstone
aka
Tommy two cups
Lets say I have 2 variables
user and db
db='username_blah'
user='username'
how would I compare those 2 saying
if user=beginning of db(everything before the_) ;
then
code here
fi
sometimes I'l have db be somethin_blah
and username will be 'something' (minus the last letter or letters) how would I do the same thing there
hope I was clear enough
help would be appreciated
Tombstone
aka
Tommy two cups