Hi, I have the following problem:
Make a script that moves all the programs in the current directory (executable files) to the subdirectory
"bin”
of the HOME directory of the user currently logged in.The script must print on the screen the names of those it moves, and indicate how many it has moved, or that it has not moved any.
If the
“bin”
directory does not exist, it must be created.
I would not know how to start doing it, the only thing I did was to put an instruction:
if [ !-d $1 ]; then # Verifico si no es un directorio válido
echo "$1 no es un directorio válido"
fi