Cannot increment a variable in bash
问题 I'm trying to create a script to count the number of hidden and non-hidden files in a folder where the script is run. However, I run into an issue where I cannot increment variables. #!/bin/bash #A simple script to count the number of hidden and non-hidden files in the folder this script is run in #Variables to store the number of hidden and non-hidden files and folders #Variables with a 'h' at the end represent hidden items files=0 fileh=0 #List all files and folders #Use grep to folder