Citat:
fascinom: Rjesio sam to prilicno nespretno. :)
sed /#/d test.conf > test.conf.out && sed /^$/d test.conf.out > test.conf.out2
Hvala.
mozes ovako:
sed -i "/^[\t\ ]*#/d; /^$/d" test.conf
Tvoj pristup (citiran) moze biti problematican, u slucaju da ti se # nalazi nakon neke vazne linije, recimo nesto tipa:
--------
# Conf file
auth-info 7 # Configure info ... <-- ovo se ne sme obrisati
---------
Pozdrav,
Dusan
Please Note: No trees were destroyed in the sending of this contaminant free message. However, we do concede, a significant number of electrons may have been inconvenienced.