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"
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
Есть скрипт:
#!/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
3 matches
Mail list logo