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

unix-shell-programming-revised-edition-programs/number -rw-r--r-- 256 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
14
15
16
17
18
19
#!/bin/sh
if [ ! -n "$1" ]
then
  read place
else
  place="$1"
fi
cd "$place"
find=`find | wc -l`
ls=`ls | wc -l`
both=`expr "$find" - "$ls" - "1"`
if [ -f file.txt ]
then
  echo "$both" >> file.txt
else
  echo "$both" > file.txt
fi
echo "$both"
read line