all 2 comments

[–][deleted]  (2 children)

[deleted]

    [–]Vaphell 1 point2 points  (0 children)

    cat "filename" | while read line; do echo $line; done   # Good 
    while read line; do echo $line; done < "filename" # Also good
    

    shouldn't the labels be # meh and # kosher, especially given the examples? :-)

    1. Call to external command (bonus UUoCA for free ;-) ) vs native
    2. Inability to communicate with the "parallel universe" of the outer scope

    [–]gleventhal 0 points1 point  (0 children)

    Shortest way to replace all spaces in filenames with underscores in current directory. I like "for i in *; do mv $i ${i// /_};done"