Sha256: 4bebe5059808d0412c56bf4b674c5d76f311e8d757db254f501a38a7e3a42422

Contents?: true

Size: 155 Bytes

Versions: 95

Compression:

Stored size: 155 Bytes

Contents

#!/bin/bash

if [[ "$1" -lt 1  || "$1" -gt 64  ]];
then
    echo "Error: invalid input"
    exit 1;
else
    index=$(($1-1))
    echo "2^$index" | bc;
fi;

Version data entries

95 entries across 95 versions & 1 rubygems

Version Path
trackler-2.2.1.98 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.97 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.96 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.95 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.94 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.93 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.92 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.91 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.90 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.89 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.88 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.87 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.86 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.85 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.84 tracks/bash/exercises/grains/example.sh