Hi all, My folder have some files and I want to show the number of files on folder at "There are : " line. This is my code : #!/bin/sh if [ -d /home/kenzo/Monday/ ] && { echo "Monday" ls -l /home/kenzo/Monday/ };then echo "====================================================" echo "There are : " else echo -e "Folder of Monday not find." echo "====================================================" fi exit 0 The script work well but it doesn't show the number of files at "There are : " line. Is it possible, pls intruct me how to do it. Thanks !
Monday folder have four files. I tested as your instruction but it doesn't show files at the line. (There are : 4 files on folder. ) Anyone help me how to fix it ? Thanks all !