从 Ubuntu 中的 smb.conf 文件中删除分号的命令

Command to remove semicolon from smb.conf file in Ubuntu

能否分享从 smb.conf 文件中删除一行分号的命令。

例如:我有如下行 ;[homes] 从这里我只想删除开头的 semicolon 。所以请分享命令。

使用sed 命令。

sed -i 's#^;\[homes\]#\[homes\]#' smbc.conf