Hi there,
I am trying to use ex(1) to replace a pattern in a text file. The behavior is not as I expected, below is the text file (copy of rc.conf)
and the ex(1) command line I am using to replace wlan string with XXX
ex(1) simply hangs and waits for a user input. Indeed, I would expect it to write changes and exit.
FreeBSD version is 10.2-RELEASE, shell is zsh(1) and ex(1) version is Version 2.1.2 (2012-11-02) The CSRG, University of California, Berkeley.
Any ideas?
I am trying to use ex(1) to replace a pattern in a text file. The behavior is not as I expected, below is the text file (copy of rc.conf)
Code:
hostname="fbsd"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
# Wifi config
wlans_iwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
# For X.org
moused_enable="YES"
dbus_enable="YES"
hald_enable="YES"
slim_enable="YES"
# Disable sendmail
sendmail_enable="NO"
sendmail_msp_queue_enable="NO"
sendmail_outbound_enable="NO"
sendmail_submit_enable="NO"
Code:
ex -sc '%s/wlan/XXX/g|x' rc.conf.copy
FreeBSD version is 10.2-RELEASE, shell is zsh(1) and ex(1) version is Version 2.1.2 (2012-11-02) The CSRG, University of California, Berkeley.
Any ideas?