I've learned never to parse ls
This commit is contained in:
parent
19279eefc3
commit
648fa1eb63
|
@ -29,6 +29,7 @@ Put
|
|||
alias fax="/your/path/to/this/project/fax.sh"
|
||||
alias faxstatus="/your/path/to/this/project/status.sh"
|
||||
alias faxbalance="/your/path/to/this/project/balance.sh"
|
||||
# The following is obsolete, but for documentation/compatibility reasons:
|
||||
fax-from-handle () { fax $1 "$(/your/path/to/this/project/Letterhead/Adressen/address.sh -f $2)"; }
|
||||
```
|
||||
into your `.bashrc` or `.bash_aliases`
|
||||
|
|
2
fax.sh
2
fax.sh
|
@ -57,7 +57,7 @@ echo -n "Sending file ${FILE} "
|
|||
REC=$(echo "$REC0" | sed -e 's:[^+0-9]::g' -e 's:^0\([1-9]\):+49\1:')
|
||||
echo "to $REC"
|
||||
#Checking for file size:
|
||||
SIZE=$(ls -l $FILE | cut -d " " -f5)
|
||||
SIZE=$(stat -c%s "$FILE")
|
||||
if [ $SIZE -gt 10485760 ]
|
||||
then
|
||||
echo "File too big. Cannot be more than 10MB."
|
||||
|
|
Loading…
Reference in a new issue