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.180 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.179 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.178 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.177 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.176 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.175 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.174 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.173 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.172 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.171 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.170 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.169 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.167 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.166 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.165 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.164 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.163 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.162 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.161 tracks/bash/exercises/grains/example.sh
trackler-2.2.1.160 tracks/bash/exercises/grains/example.sh