@[email protected] to [email protected] • edit-21 year agocat vs sed vs awklemmy.sdf.orgimagemessage-square21fedilinkarrow-up177arrow-down12
arrow-up175arrow-down1imagecat vs sed vs awklemmy.sdf.org@[email protected] to [email protected] • edit-21 year agomessage-square21fedilink
minus-squarenarsheelinkfedilink5•edit-21 year agocat while read -r l; do echo "$l"; done < cat -e while read -r l; do echo "$l"$; done < cat -n n=0; while read -r l; do n="$((n+1))"; printf '%5d %s\n' "$n" "$l"; done < cat -b n=0; while read -r l; do [ -n "$l" ] && n="$((n+1))" && printf '%5d %s' "$n" "$l"; echo; done <
minus-square@[email protected]linkfedilink3•1 year ago$ n=0; while read -r l; do n="$((n+1))" printf ' %d %s\n' "$n" "$l"; done < /etc/os-release 0 NAME="openSUSE Tumbleweed" 0 # VERSION="20230619" 0 ID="opensuse-tumbleweed" [...]
cat
while read -r l; do echo "$l"; done <
cat -e
while read -r l; do echo "$l"$; done <
cat -n
n=0; while read -r l; do n="$((n+1))"; printf '%5d %s\n' "$n" "$l"; done <
cat -b
n=0; while read -r l; do [ -n "$l" ] && n="$((n+1))" && printf '%5d %s' "$n" "$l"; echo; done <
$ n=0; while read -r l; do n="$((n+1))" printf ' %d %s\n' "$n" "$l"; done < /etc/os-release 0 NAME="openSUSE Tumbleweed" 0 # VERSION="20230619" 0 ID="opensuse-tumbleweed" [...]
; was missing