Issue
I`m trying to write script that will write down to file, names, permissions and modification time of files in directory that are exactly 3 characters long
But without using [awk] or [sed] commands
Solution
#! /bin/bash
set -eu
dir=$1
out=$2
for file in "$dir"/??? ; do
if [ -f "$file" ] ; then
stat -c'%n %A %y' "$file"
fi
done > "$2"
Run it with two parameters, the directory to search and the output file name.
Answered By - choroba