sebastiancarlos@lemmy.sdf.org to Linux@lemmy.ml · edit-22 years agocat vs sed vs awklemmy.sdf.orgimagemessage-square20fedilinkarrow-up139arrow-down10
arrow-up139arrow-down1imagecat vs sed vs awklemmy.sdf.orgsebastiancarlos@lemmy.sdf.org to Linux@lemmy.ml · edit-22 years agomessage-square20fedilink
minus-squarenarshee@iusearchlinux.fyilinkfedilinkarrow-up3·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