#!/bin/bash DESTINO="$HOME/copia" if [ ! -d "$DESTINO" ]; then mkdir "$DESTINO" echo "Direct $DESTINO creado" fi for fichero in *; do if [ -d "$fichero" ]; then echo "$fichero existe" elif [ ! -f "$fichero" ]; then if [ ! -f "$DESTINO/$fichero" ]; then cp "$fichero" "$DESTINO/" echo "$fichero copiado" fi fi done