2015-10-26 11:40:54 +0000, Pádraig Brady:
[...]
> Summary is you can do this with GNU sed:
> 
> ( echo 99 ; seq 10 ) | ( sed -u 1q ; sort -n )
[...]

Or POSIXly:

awk 'NR <= 3 {print; next}; {print | "sort -n"}'

Or:

(IFS= read -r line && printf '%s\n' "$line"; sort -n)

On systems that still have the "line" utility:

(line; sort -n)

-- 
Stephane


Reply via email to