Originally Posted by carltm
Here is a way to find and print the string "ora".
sed 's/.*ora.*/' filename | grep ora
Here is a way to get a valid username.
until [ "$Valid" = yes ]
echo -n "Please enter username: "
if grep "^$UserName:" /etc/passwd >/dev/null
else echo $UserName is not valid.
script works fine. but not the sed command..
[oradev@oracle datas]$ cat new.txt
oradev@oracle datas]$ sed 's/.*ora.*/' new.txt | grep ora
sed: -e expression #1, char 10: unterminated `s' command
Your help is highly appreciated.