Sunday, July 28, 2019

List files in a directory using a shell script

#!/bin/bash
while read line
do               
    echo "File: " $line
done < <(ls -1 /someDir)

No comments:

Post a Comment