help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Remove comment characters at start of line


From: Hans Lonsdale
Subject: Remove comment characters at start of line
Date: Thu, 2 Feb 2023 04:18:04 +0100 (CET)


I am trying to understand this sed line matching part, that is supposed to 
remove the comment characters
at the start of the line.  The pattern is pn_ere.

  pn_ere="^[[:space:]]*([#;!]+|@c|${cmt})[[:space:]]+"

  sed -E -n "
    /$beg_ere/ {
      :L1
      n
      /$end_ere/z
      /$pn_ere/!z
      s/// ; p
      tL1
    }
  "



-- 
Sent with https://mailfence.com  
Secure and private email



reply via email to

[Prev in Thread] Current Thread [Next in Thread]