I need to create a program via vim
in Linux called between
. The script takes two arguments as the lower bound and upper bound of the file size, and prints out a list of file names as well as their sizes. However, I can't use the find
command to complete this script.
I have gotten this far: to display all the files; but I can't seem to display specific ones WITHOUT find
.
#!/bin/bash
for i in *
do
set -- $(ls -l "$i")
echo $i: $5 bytes
done
find
– Phantom1421 May 02 '16 at 18:20ls
— there is no way to do it 100% reliably. Bad, bad habit. Please just don't. – Wildcard May 02 '16 at 20:09