Skip to content

TenthLine - bash #278

Description

@hinell

Well I think the example given in the TenthLine.sh is a pure cheating. Here a few good examples for faster bash solution:

declare i=1;
while read line;
do ((++i)); [[ i -eq 11 ]] && echo $line;
done < file.txt

or

IFS=$'\n' readarray arr < file.txt; echo ${arr[9]}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions