following redirect and using bash