Portál AbcLinuxu, 11. května 2024 16:03
Poradí mi niekto akým spôsobom (príkazom) sa dá odstrániť len ten posledný riadok?viz
man tail
deb http://ftp.cz.debian.org/debian jessie main contrib non-free
man head
head -n -1 soubor
sed -e '$d' soubor > soubor.out
pokud chcete 'in place' edit tak novejsi sedy umi parametr -i, nebo pouzijete trik
(rm -f soubor; sed -e '$d' > soubor) < soubor
Tiskni Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.