Portál AbcLinuxu, 14. července 2025 23:36
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.