N.S.F. - New Script File, Bash Script File Header Creator - Version 3.00

I have updated N.S.F. - New Script File to version 3.00 (works with openSUSE 12.3) It has the option to add a GPL statement to your script file and Version 3.xx now resides in the folder /usr/local/bin in order to use both KDE & GNOME icon files for easy GUI startup. This requires you use the root password in order to install this bash script version. If you like to share your scripts with others, you may want to think about including a GPL statement. It makes it clear that there is no warranty included with your script even as anyone is free to use and modify your script as they so desire. You still maintain a copyright on your original work, should that be required for something in the future. Keep using version 2.xx if you do not have root authority on your system to install nsf in the folder /usr/local/bin.

NSF (New Script File) version 3.xx has the following features …

  1. NSF assists you in creating a new and or editing an existing bash script file.
  2. NSF uses a GUI question and answer window in your desktop for the file name, no need to open up a terminal session.
  3. NSF asks if this is an existing or new bash script.
  4. If the script is existing, a file selection Windows will be displayed for the existing file selection.
  5. If new, NSF asks for the name of the script file you wish to create, but if it already exists, you can still just edit the existing file.
  6. Existing bash script files will have a backup file made for you, just in case you need it.
  7. Your new script file will receive a header and footer, which you can modify in NSF.
  8. Your new script file will be marked Executable for you.
  9. As you save your bash script file, you do not need to close the editor. Just open a Terminal session, type the script file name and see if it works.
  10. Auto Detection of zenity and kdialog made for you which you can override.
  11. Allows the addition of a GPL statement to make clear the use of your script should it be released to the public.

New features with 3.xx include:

  1. New Backup Folder Support for all Backups.
  2. All Backups are now moved to your selected Backup folder each time you run nsf
  3. The GPL Copyright Year is Automatically set to the present Year.
  4. Creates both KDE & GNOME icons in the Applications menu and on the Desktop.
  5. The new folder location of /usr/local/bin for the NSF bash script now allows it to be usable by all Linux users on your PC!
  1. When you start nsf you will be asked if you wish to edit an existing file:


  1. If you answer yes, then you must select the existing script file:


  1. Here is the New Script File GUI Name Request:


  1. Here is the GPL GUI statement inclusion request:


  1. Should the script file already exist, here is the GUI request to edit anyway:


To use the bash script file nsf, you need to download the following text from SUSE Paste (Actual Link is shown below) into a text editor like kwrite:

N.S.F. - New Script File, Bash Script File Header Creator - Version 3.00

Save the text as root in the folder /usr/local/bin as the file named nsf.

If you have been using an older 2.xx or 1.xx version of nsf, execute this command before you download and use the new 3.xx version:

rm $HOME/bin/nsf ; rm $HOME/Desktop/NSF.desktop

It is possible to directly download this script from a terminal session (You must delete or rename the older 3.xx version first if it exists):

sudo rm /usr/local/bin/nsf
sudo wget -nc http://paste.opensuse.org/view/download/27761727 -O /usr/local/bin/nsf

This script must be marked executable to be used. Please run the following Terminal command:

sudo chmod +x /usr/local/bin/nsf 

It is even possible to string all three of these commands together as one. I HIGHLY RECOMMEND you use this method to install nsf. Copy the following command, open up a terminal session, paste it in and press enter:

sudo rm /usr/local/bin/nsf ; sudo wget -nc  http://paste.opensuse.org/view/download/27761727 -O /usr/local/bin/nsf ; sudo chmod +x /usr/local/bin/nsf

If you DO NOT HAVE ROOT Authority on your PC, use the following command for the older nsf 2.81 version ONLY:

rm ~/bin/nsf ; wget -nc  http://paste.opensuse.org/view/download/51163610 -O ~/bin/nsf ; chmod +x ~/bin/nsf

In the script, there are several lines you might want to edit. The first is to use your name as the script file editor. Modify the script line that says:

# **Place Your Name Here as the script file author **


# **Place Your Email Address Here **


# **Location For Your Script Files to be saved **


# **Determine if you want a backup file made for existing scripts. **
# **Just set to false if you do not want this backup file made.**


# **nsf can create a kde/gnome icon if you want. nsf_icon_check=true creates an** 
#** icon if not there for the KDE desktop. nsf_icon_check=false does not create a  **
# **desktop icon. The KDE icon is located/named $HOME/Desktop/NSF.desktop.**


#** nsf can create a kde/gnome menu icon if you want. nsf_appl_check=true creates  
**#** an appl menu if not there. nsf_appl_check=false does not create a appl menu
**# **icon. The nsf_icon_check=true above must be set before an Application menu
**#** is create located/named as /usr/share/applications/NSF.desktop.**


# **KDE/GNOME Desktop icon name** 


# K**DE Desktop icon Location/Name - Look for it in your desktop folder **


#  **KDE/GNOME Menu icon Location/Name - Look for it in your Applications menu **


N.S.F. will now create a desktop icon if the script value sysiconcheck=true is set (which you can set to false), you have a folder called ~/Desktop & the N.S.F> icon is not already there for you to use.

Running the nsf.desktop icon from your desktop would create an executable script file called myscript (in this example) and once kwrite opens it up, you would see something like the following information which you can then edit as your new script:


#: Title       : myscript
#: Date Created: Sat Dec 22 12:43:15 CST 2012
#: Last Edit   : Sat Dec 22 12:43:15 CST 2012
#: Author      : Your_Names_Here
#: Version     : 1.00
#: Description : 
#: Options     : 

# This is the standard GPL Statement, leave at the top of the script.
# Just use the command show_gpl after this function for it to be shown.

function show_gpl {
echo ""
echo "myscript is a bash script file written to be used with openSUSE."
echo "Copyright (C) 2012 by Your_Names_Here, Your_Name@SomeWhere.com"
echo ""
echo "This program is free software; you can redistribute it and/or modify"
echo "it under the terms of the GNU General Public License as published by"
echo "the Free Software Foundation; either version 2 of the License, or"
echo "(at your option) any later version."
echo ""
echo "This program is distributed in the hope that it will be useful,"
echo "but WITHOUT ANY WARRANTY; without even the implied warranty of"
echo "GNU General Public License for more details."
echo ""
echo "You should have received a copy of the GNU General Public License"
echo "along with this program; if not, write to the Free Software"
echo "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"
echo ""

exit 0

# End Of Script

As always, I would love to hear any comments you have about using the script file creator script.

Thank You,

Blogs:](http://forums.opensuse.org/blogs/jdmcdaniel3/sysedit-system-file-editor-version-1-00-60/) C.F.U. : N.S.F. : S.A.K.C. : MMCHECK : S.C.L.U. : S.G.T.B. : S.K.I.M. : S.L.A.V.E.](http://forums.opensuse.org/blogs/jdmcdaniel3/sysedit-system-file-editor-version-1-00-60/)

N.S.F. - New Script File has been updated to version 2.75 and includes a new existing bash script file selection menu and it will create a icon useable on a KDE desktop. If you want to write bash scripts and you have not downloaded NSF, you have just got to give this utility a try.

Thank You,

N.S.F. - New Script File has been updated to version 2.81 and includes a new backup file enhancement. If you want to write bash scripts and you have not downloaded NSF, you have just got to give this utility a try.

Thank You,

N.S.F. - New Script File, Bash Script File Header Creator has been upgraded to Version 3.00 and supports both KDE & GNOME Application menu icons for you. It still creates the KDE desktop icon just as before. nsf has been moved to a new location at /usr/local/bin and you should remove the old version. I list the proper command you should use to remove the old nsl before you install the new 3.xx version onto your system.

As always I would love to hear your comments or suggestion in using nsf.

Thank You,