You need to open the text editor with root permissions when you create, then 'save' the file. Then it will 'stick'.
I don't know what text editor you're using (Leafpad, Gedit, Geany, Nano; Vim? (*Gawd, I hope not, for your sake!* )) , but you want to open it via the terminal, e.g:-
sudo leafpad, or
sudo gedit, or
sudo geany, or
sudo nano, or
...etc. That will open the editor with the correct permissions, because this is a 'system' file you're modifying/creating, y'see; it's not in your 'home' user folder, so you temporarily 'acquire' root (system) permissions via the use of 'sudo'. Lasts, I believe, for around 10-15 mins; after that, you've got to use 'sudo' again.
Then, having created the file, you can save it to the relevant location, with the appropriate name. When you put those two lines in, don't put 'sudo' at the start of each one; it's not necessary, since it's executed by the system at boot. Like this:-
modprobe -rv rtl8723be
modprobe -v rtl8723be ant_sel=1
Make sense? You'll find out that a large part of any Linux distro you care to name runs from text files like this one. It's why Linux is so easy to modify, and why it's so customizable..!
Conky, the well-known system monitor? Runs from a text file.
Samba, the app that lets you share files over a network? Runs from a text file.
And the configuration stuff for any app you happen to be running? Invariably, without exception, it'll be a text file.... Even the kernel itself (currently somewhere around 30 million lines of code) can (if you wanted to!) be opened as a text file.
So now you know..!
Edited by Mike_Walsh, 15 September 2017 - 07:20 PM.
Distros:- Multiple 'Puppies'..... and Anti-X 16.1
My Puppy BLOG ~~~ My Puppy PACKAGES
Compaq Presario SR1916UK; Athlon64 X2 3800+, 3 GB RAM, WD 500GB Caviar 'Blue', 32GB Kingspec PATA SSD, 3 TB Seagate 'Expansion' external HDD, ATI Radeon Xpress 200 graphics, Dell 15.1" pNp monitor (1024 x 768), TP-Link PCI-e USB 3.0 card, Logitech c920 HD Pro webcam, self-powered 7-port USB 2.0 hub
Dell Inspiron 1100; 2.6 GHz 400FSB P4, 1.5 GB RAM, 64GB KingSpec IDE SSD, Intel 'Extreme' graphics, 1 TB Seagate 'Expansion' external HDD, M$ HD-3000 'Lifecam'.