Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ls $1 > temp1
- linie = wc -l temp1
- while (( $linie -ne 0 )); do
- plik = sed -n "$linie"p temp1;
- grep $2 "$1"/plik > temp2;
- grep $3 "$1"/plik > temp3;
- if [ -s temp2 ]; then rm temp2;
- elif [ -s temp3 ]; then rm temp3;
- else mv "$1"/plik ten_"$1"/plik;
- fi
- rm temp2;
- rm temp3;
- linie=$(($linie-1));
- done;
- rm temp1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement