#!/bin/bash read -ra arr # first wordfirstWord="${arr[0]}" # remove 1st word from arrayarr=("${arr[@]:1}") # check outputdeclare -p firstWord arr
168820245 firstName LastName DateOfBirth foo bar baz xyz 123 999
declare -- firstWord="168820245" declare -a arr=([0]="firstName" [1]="LastName" [2]="DateOfBirth")
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!