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
21 remaining solutions by
signing in and submitting your own entry
589 active golfers, 2544 entries
27
04/20/2022 at 07:52PM
28
04/20/2022 at 07:51PM
29
04/20/2022 at 07:31PM
30
04/20/2022 at 07:30PM
31
04/20/2022 at 07:28PM
31
04/20/2022 at 07:29PM
32
04/20/2022 at 07:20PM
33
04/20/2022 at 07:05PM
35
04/20/2022 at 07:00PM
36
04/20/2022 at 06:56PM
37
04/20/2022 at 06:54PM
49
04/20/2022 at 06:28PM
49
04/20/2022 at 06:50PM
50
04/20/2022 at 06:32PM
50
04/20/2022 at 06:33PM
52
04/20/2022 at 06:26PM
52
04/20/2022 at 06:35PM
53
04/20/2022 at 06:46PM
57
04/20/2022 at 06:05PM
57
04/20/2022 at 06:07PM
58
04/20/2022 at 06:06PM