#! /bin/bash
while read a ; do echo "$a" ; if echo "$a" | grep "$3" >/dev/null ; then cat "$2" ; fi ; done <"$1"
#! /bin/bash
if [ ! -f "$1" ] ; then
echo "Invalid input file 1: $1" >&2 ;
exit 1;
fi;
if [ ! -f "$2" ] ; then
echo "Invalid input file 2: $2" >&2 ;
exit 2;
fi;
if [ "x$3" == x ] ; then
echo "No search string." >&2 ;
exit 3;
fi;
while read a ; do echo "$a" ; if echo "$a" | grep "$3" >/dev/null ; then cat "$2" ; fi ; done <"$1"
#! /bin/bash
if [ ! -f "$1" ] ; then
echo "Invalid input file 1: $1" >&2 ;
exit 1;
fi;
if [ ! -f "$2" ] ; then
echo "Invalid input file 2: $2" >&2 ;
exit 2;
fi;
if [ "x$3" == x ] ; then
echo "No search string." >&2 ;
exit 3;
fi;
rm -f "$1.tmp"
while read a ; do echo "$a" | tee "$1.tmp"; if echo "$a" | grep "$3" >/dev/null ; then cat "$2" | tee "$1.tmp" ; fi ; done <"$1"
mv "$1" "$1.old"
mv "$1.tmp" "$1"
Если Вы уже зарегистрированы на Портале - войдите в систему, если Вы еще не регистрировались - пройдите простую процедуру регистрации.