Fix the shell script with the fewest keystrokes!
Start file
#!/bin/bash
a = 5
b = 10
sum = $a + $b
echo $sum
mul = $a * $b
echo $mul
End file
#!/bin/bash
a=5
b=10
sum=$((a + b))
echo $sum
mul=$((a * b))
echo $mul
2,4c2,4
< a = 5
< b = 10
< sum = $a + $b
---
> a=5
> b=10
> sum=$((a + b))
7c7
< mul = $a * $b
---
> mul=$((a * b))
Unlock
23 remaining solutions by
signing in and submitting your own entry
589 active golfers, 2544 entries
28
04/13/2024 at 11:15AM
28
04/13/2024 at 11:48AM
28
04/13/2024 at 12:51PM
29
04/13/2024 at 11:13AM
29
04/13/2024 at 11:49AM
29
04/13/2024 at 12:22PM
29
04/13/2024 at 12:50PM
30
04/13/2024 at 11:05AM
30
04/13/2024 at 11:38AM
31
04/13/2024 at 11:01AM
31
04/13/2024 at 11:03AM
31
04/13/2024 at 11:42AM
32
04/13/2024 at 10:54AM
33
04/13/2024 at 12:50PM
35
04/13/2024 at 10:46AM
35
04/13/2024 at 10:52AM
35
04/13/2024 at 10:54AM
37
04/13/2024 at 10:17AM
37
04/13/2024 at 11:45AM
42
04/13/2024 at 10:45AM
54
04/13/2024 at 10:42AM
57
04/13/2024 at 10:35AM
90
04/13/2024 at 10:40AM