[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-ed] Not failing on no match.
From: |
Steve Traylen |
Subject: |
[Bug-ed] Not failing on no match. |
Date: |
Fri, 19 Sep 2008 11:33:24 +0200 |
This is a support request rather than a bug but not anywhere else
obvious to ask.
How do I avoid an error when a match does not work. I want to move to
a line if it exists or
else just stay where I am.
e.g
# grep string /etc/passwd
# ed /etc/passwd
1472
m/string/
?
q
# echo $?
2
In this case string is not in /etc/passwd and I want to just carry on
editing after this.
(NB, I'm not really using ed on the passwd file, just an example)
Steve
--
Steve Traylen
- [Bug-ed] Not failing on no match.,
Steve Traylen <=