On Tue, May 13, 2008 at 02:07:07PM +0200, William James wrote:
>
> I wish to avoid using read. /bin/sed can cut and paste fields based on
> pattern and I'm searching for something similar in ksh93, i.e. the
> reverse operation of ${buf##pattern}, instead of removing pattern
> remove all characters which do not match pattern.
sed without using the read builtin would be an option:
sed -n '/^part5:/p' <<EOF
part1: a part
part5: another part
# comment
part9: 9th part
EOF
//Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users