A Unix script is not necessary. The zip utility has the capability of compressing the files with a password.
# SS29 # Script to delete all lines containing the word 'unix' from files supplied as arguments # Usage: SS29 file1 file2 file3 ... if [$# -lt 2] then echo Insufficient arguments exit fi for file do grep -v unix $file>/temp/$file cp /temp/$file $file done
Use the 'script' command; it captures everything you are doing and stores it into a file.
For windows, you might use .cmd, .bat as common file extensions. Unix doesn't use file extensions as associations, so no file extension needs to be used in the Unix environment. A shell script in Unix is simply a text file with any name that is readable and executable. However, file extensions are typically used in Unix as a documentation aid that states that the file is a shell script. Common extensions are .sh, .csh, .ksh, .tcsh, .zsh, etc.
You must first compress the files as a .ZIP file. When you compress the file, under the security tab, you can password protect it.
For any Unix or Linux based operating system, make the text file readable and executable and then invoke (call) it by the file name, which will execute the script.
You can't give password to a notepad file. If u wish to protect ur file. Cut that file/files into a compressed(zipped folder) and then select 'add password' in 'file'. Give password. Hereafter whenever u open this file, it will ask u password.
To password protect a file on Microsoft Office, open the file, click Options on the Tools menu, then click Security. You will have the option to create a password that will be needed to open the file, or a password that will be required to modify the file.
Use the 'chmod' command to change permissions on any file. Note: you have to be the owner (or the superuser) to do this.
Passwords are protected in 2 essential ways: first, the file containing the password is only viewable by the administrator (root) account. Secondly, the password itself is hashed so that it appears to be encrypted, and is a one-way hash. This means there is no way to retrieve a hashed password (other than guessing). It has to be reset in that case.
To password protect your document go to: For 2007: Go to the Office Icon Find Prepare Click Encrypt And type in Pasword For 2003 Go to File Go to Encrypt or Password Protect or Lock The type in your password, do not forget it!
You will have to be more specific about what you intend to do. In general, a shell script by itself does not read file information and then do something with it. There may be calls to other scripting languages such as awk, perl, python, etc., that will actually read the information and process the data.
A shell script is nothing more than a readable and executable ASCII text file. In this file you put all of the commands that you want to execute, in sequence. The name of the file can be anything you like. Any text editor (VI, VIM, pico, etc) can create a shell script file In addition, shell script files have the ability to detect logic, and are programmable. Just think about what tasks you want to perform and their order, and put it into a file, and there you have a shell script.