How can I use ls *.txt | wc as a separate variable so I can use it in a loop afterwards? That is
ls *.txt | wc
count.files=$(ls *.txt | wc)...if count.files -ne 2000; thenecho "message"fi
I have tried it but it seems it doesn't work.
Aucun commentaire:
Enregistrer un commentaire