1) I want to do an exact pattern matching
type : FILL
something manual fill
type : MANUAL_FILL
if I do grep -B 1 "FILL" should return only the first pair of lines. how can I do that?
grep -B 1 -x "FILL" is not working. Please suggest.
2) How to change the shell from csh to bash?
> echo $SHELL
chsh -s /bin/bash
chsh: can only change local entries; use ypchsh instead.
> grep bash /etc/shells
bash-3.2$ echo $SHELL
> which bash
3) #if [ $# -ne 1 ] then
# echo "Usage: cat logfile | sh `basename $0` ORDER_TYPE"
# exit 1
The above if condition is giving me an error. Why is that? looks valid to me.