sebastiancarlos@lemmy.sdf.org to Linux@lemmy.ml · edit-22 years agocat vs sed vs awklemmy.sdf.orgimagemessage-square19fedilinkarrow-up140arrow-down10
arrow-up140arrow-down1imagecat vs sed vs awklemmy.sdf.orgsebastiancarlos@lemmy.sdf.org to Linux@lemmy.ml · edit-22 years agomessage-square19fedilink
minus-squarenarshee@iusearchlinux.fyilinkfedilinkarrow-up2·edit-22 years agocat while read -r l; do echo "$l"; done < cat -n while read -r l; do echo "$l"$; done < cat -e n=0; while read -r l; do n="$((n+1))" printf ' %d %s\n' "$n" "$l"; done < cat -b n=0; while read -r l; do [ -n "$l" ] && n="$((n+1))" && printf ' %d %s' "$n" "$l"; echo; done <
cat
while read -r l; do echo "$l"; done <
cat -n
while read -r l; do echo "$l"$; done <
cat -e
n=0; while read -r l; do n="$((n+1))" printf ' %d %s\n' "$n" "$l"; done <
cat -b
n=0; while read -r l; do [ -n "$l" ] && n="$((n+1))" && printf ' %d %s' "$n" "$l"; echo; done <
deleted by creator
; was missing