Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- clear
- echo "">$1
- if [ $# -lt 2 ] ; then
- echo "Nieprawidlowa liczba argumentow"
- else
- for i in "${@:2}"; do
- if [ ! -f $i ]; then
- echo "Podany plik nie istnieje"
- exit
- fi
- done
- for i in "${@:2}"; do
- if [ ! -s $i ]; then
- echo "Podany plik jest pusty"
- exit
- fi
- done
- for i in "${@:2}"; do
- if [ ! -r $i ]; then
- echo "Nie masz prawa do odczytu pliku"
- exit
- fi
- done
- for i in "${@:2}"; do
- touch $1;
- cat $i >> $1
- done
- cat $1;
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement