I got a folder /srv/log/
on a Linux server where I have subfolders with the server names:
server1 server2 server3 server4
I need a command which will show me what is inside of those folders, but only specific ones which i have in text file "del_list":
server2
server4
I am trying to use a loop:
for i in `cat del_list`; do `ls /srv/log/$i/`; done
but it shows me only part of those servers and error:
-bash: folder1: command not found
-bash: folder2: command not found
but there are many other folders:'folder2, folder3' there. But I cannot list them using my command, what did I do wrong here?