-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDoneYet
More file actions
executable file
·39 lines (33 loc) · 887 Bytes
/
DoneYet
File metadata and controls
executable file
·39 lines (33 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/csh -f
#doesn't quite work yet, still havne't worked out the integer issue.
if ($1 == "" || $2 == "") then
echo " DoneYet <filesize><filename>"
echo " When actual size of filename = filesize, untar filename"
exit
endif
set GoalSize = $1
set filename = $2
if( ! ( -e $filename ) ) then
echo " Please at least initiate the transfer. $filename doesn't exist at all"
exit
endif
set ActualSize = `ls -l $filename |awk '{print $5}'`
echo "Dest Size " $GoalSize " filename "$filename
echo "Actu Size " $ActualSize
set ActualSize = 10129113088
set GoalSize = 20244582400
if( $ActualSize < $GoalSize ) then
echo "less than"
else
echo "greater than"
endif
exit
#this is what I want in the end.
#while( $ActualSize < $GoalSize )
# set ActualSize = `ls -l $filename |awk '{print $5}'`
# echo $ActualSize "<" $GoalSize
# echo "bitch"
# sleep 3
#end
#tar xvf $filename
##end