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.139 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.138 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.137 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.136 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.135 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.134 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.133 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.132 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.131 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.130 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.129 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.128 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.127 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.126 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.125 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.124 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.123 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.122 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.121 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.120 tracks/bash/exercises/grains/example.sh