When dealing with scripts, you'll need a better text editor to work on the fly. I've been using Windows previously, and Notepad++ is a good text editor to get me going around scripts. Moving recently to Linux, you can't get Notepad++, but you may use Notepadqq as an alternative.
Here are the steps to install this piece of text editor. First, add the required repo to get the installer:
root@ubuntu:/home/fwnh67# add-apt-repository ppa:notepadqq-team/notepadqq
Notepadqq text editor
More info: https://launchpad.net/~notepadqq-team/+archive/ubuntu/notepadqq
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmpgrega6w7/secring.gpg' created
gpg: keyring `/tmp/tmpgrega6w7/pubring.gpg' created
gpg: requesting key 63DE9CD4 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpgrega6w7/trustdb.gpg: trustdb created
gpg: key 63DE9CD4: public key "Launchpad PPA for Notepadqq Team" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
Once the repo has been added, update the repo lists.
root@ubuntu:/home/fwnh67# apt-get update
After that, fetch the installer and installed the software.
root@ubuntu:/home/fwnh67# apt-get install notepadqq
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
notepadqq-common
The following NEW packages will be installed:
notepadqq notepadqq-common
0 upgraded, 2 newly installed, 0 to remove and 239 not upgraded.
Need to get 950 kB of archives.
After this operation, 5,446 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu/ trusty/main notepadqq-common all 0.50.6-0~trusty1 [695 kB]
Get:2 http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu/ trusty/main notepadqq amd64 0.50.6-0~trusty1 [255 kB]
Fetched 950 kB in 6s (136 kB/s)
Selecting previously unselected package notepadqq-common.
(Reading database ... 166254 files and directories currently installed.)
Preparing to unpack .../notepadqq-common_0.50.6-0~trusty1_all.deb ...
Unpacking notepadqq-common (0.50.6-0~trusty1) ...
Selecting previously unselected package notepadqq.
Preparing to unpack .../notepadqq_0.50.6-0~trusty1_amd64.deb ...
Unpacking notepadqq (0.50.6-0~trusty1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Setting up notepadqq-common (0.50.6-0~trusty1) ...
Setting up notepadqq (0.50.6-0~trusty1) ...
update-alternatives: using /usr/lib/notepadqq/notepadqq.sh to provide /usr/bin/notepadqq (notepadqq) in auto mode
And you're done!