hi,a question .. why does my script work as sh script.sh and not as ./script.sh ??
also,i was trying to write a script that would filter out a pattern in a .txt file and display the count of the same. Say my pattern is king, and there are 4 "king"s in the txt file .. also there are two "taking"s .. shouldnt the count be 6? m getting 4.
command -- grep -i "king" | wc -l
looking for healthy replies ..