]> git.donarmstrong.com Git - bin.git/commitdiff
fix ambiguous redirect
authorDon Armstrong <don@donarmstrong.com>
Tue, 29 Jan 2019 01:56:54 +0000 (17:56 -0800)
committerDon Armstrong <don@donarmstrong.com>
Tue, 29 Jan 2019 01:56:54 +0000 (17:56 -0800)
upload_ics

index f0169c48dc9724541fb045e6c311d87e0f093425..39e38555a0f6e1c3c4c2c99e5fe8189ef1c3d2af 100755 (executable)
@@ -15,13 +15,13 @@ for file in "$@"; do
     ehead=${bevents[0]}
     let "ehead -= 1"
 
-    bfoot=$(wc -l < $file)
+    bfoot=$(wc -l "$file")
     let "bfoot -= ${eevents[-1]}"
 
     for (( i=0; i < ${#bevents[@]}; i++)); do
-        head -n $ehead "$file" > "$file"-$i.ics
-        sed -n ${bevents[$i]},${eevents[$i]}p "$file" >> "$file"-$i.ics
-        tail -n $bfoot "$file" >> "$file"-$i.ics
+        head -n $ehead "$file" > "$file-$i.ics";
+        sed -n ${bevents[$i]},${eevents[$i]}p "$file" >> "$file-$i.ics";
+        tail -n $bfoot "$file" >> "$file-$i.ics";
     done
 done