~johanvandegriff/unix-shell-programming-revised-edition-programs

unix-shell-programming-revised-edition-programs/mysort -rw-r--r-- 217 bytes
fc214385Johan Vandegriff added other old scripts, some newer ones too 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
for line in `ls -1`
do
  if [ -f "$line" ]
  then
    clear
    ls -l "$line"
    echo
    ls -l | grep "^d" | sed "s/  */ /g" | cut -f9- -d" "
    read dir
    test -d "$dir" && mv "$line" "$dir"
  fi
done