Linux - display only uncommented lines

Linux - display only uncommented lines

Hello, I would like to know if it is possible on Linux to somehow achieve that, for example, in the configuration file use cat /etc/iscsi/iscsid.conf to display only those lines that are not a comment = ie. I don't want to show lines starting with #. Would it work somehow? Thanks

REPLY


Hi,

uncommented lines can be filtered out with the -v parameter for grep as follows:

sudo cat /etc/iscsi/iscsid.conf | grep -v '#'

Související obsah

linux

bash

terminal

grep

cat

Komentáře

Vaše reakce na Linux - zobrazit pouze nekomentované řádky

Reference

Podívejte se na naše reference

Prohlédnout

Aplikace

Podívejte se na naše aplikace

Prohlédnout

Co umíme?

Podívejte se co umíme

Prohlédnout

Co umíme?

Vytváříme sofistikované aplikace pro náročné

Od webových aplikací přes android až po převodové můstky či složité informační systémy.

Podívejte se k nám

Máte ještě čas? Podívejte se na další rubriky

Tento web používá soubory cookie. Dalším procházením tohoto webu vyjadřujete souhlas s jejich používáním.. Více informací zde.