Re: вопрос по shell-программированию

2013-02-21 Пенетрантность Artem Chuprina
Voland Levit -> debian-russian@lists.debian.org @ Thu, 21 Feb 2013 22:07:42 +0600: VL> Есть скрипт: VL> #!/bin/sh VL> items="items.db" VL> sales="sales.db" VL> receivings="receivings.db" VL> errors="errors.db" VL> clear VL> echo -n "Input item: " VL> read x VL> if [ "$(grep -i "$x"

Re: вопрос по shell-программированию

2013-02-21 Пенетрантность Peter Pentchev
On Thu, Feb 21, 2013 at 10:07:42PM +0600, Voland Levit wrote: > Есть скрипт: > > #!/bin/sh > items="items.db" > sales="sales.db" > receivings="receivings.db" > errors="errors.db" > > clear > > echo -n "Input item: " > read x > > if [ "$(grep -i "$x" $items)" = "" ]; then > echo "No item

вопрос по shell-программированию

2013-02-21 Пенетрантность Voland Levit
Есть скрипт: #!/bin/sh items="items.db" sales="sales.db" receivings="receivings.db" errors="errors.db" clear echo -n "Input item: " read x if [ "$(grep -i "$x" $items)" = "" ]; then echo "No items in database" echo "$(date '+%Y-%m-%d %H:%M') $x" >> error.db else grep $x