Sort by

recency

|

49 Discussions

|

  • + 0 comments

    I'm not sure why this isn't working. Test case 2 is failing for no apparent reason. This is the most elegant solution, thank you very much Zorse Unlimited

    while read X; do
        echo "${X:0:4}"
    done
    
  • + 0 comments

    cut -b 1-4

  • + 0 comments

    Simple Code

    while read lines; do
        echo $lines | cut -c 0-4
    done
    
  • + 0 comments

    why the fk does this not work? Test case 2 fails, for no reason. This IS the most elegant solution thank you very much.

    while read X; do
        echo "${X:0:4}"
    done
    
  • + 1 comment
    while read lines; do
        echo $lines | cut -c 0-4
    done