10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
1 echo -e "Enter a filename"
2 read filename
3 if
4 then
5 echo -e "do you want to delete?"
6 read answer
7 if
8 then rm myfirst
9 else
10 echo -e "file not deleted"
11 fi
12 exit0 (1 Reply)
Discussion started by: Speedy
1 Replies
2. Red Hat
Hi,
We have installed linux6(RHEL) OS and installed datastage application on that.
First time installation worked fine and our all services related to datastage was up and running.
When we stopped the datastage and restarted its giving below error while restart:-
./uv -admin -start
DataStage... (0 Replies)
Discussion started by: prasson_ibm
0 Replies
3. Shell Programming and Scripting
Hi all,
I am very new to programming and even newer to this forum as well, so I apologize if this should have been in the Newbie category, but...
I am currently trying to figure out Shell Scripting and am running into problems early. Not having taken any kind of programming class, I am not even... (2 Replies)
Discussion started by: ccorder22
2 Replies
4. Shell Programming and Scripting
Below is a test script I'm writing in the process of learning to write script. When I try to run it I get an unexpected end of file error on line 56. Thoughts?
SCRIPT:
#!/bin/bash
# system_page - A script to produce a system information HTML file
##### Constants
TITLE="My System... (1 Reply)
Discussion started by: mpercy725
1 Replies
5. Shell Programming and Scripting
I am not sure what I am doing wrong here, I did some research and only confused myself further. Any help would be greatly appreciated. I need to make this work for work tomorrow.
There are only 34 lines of code in this script, yet its complaining about line 35
Here is the code:
... (7 Replies)
Discussion started by: BkontheShell718
7 Replies
6. Shell Programming and Scripting
Hi All ,
My below script is for chacking vaule and then trucating table :
___________
test4@aceuatcs04:/u01/test4/SOLID/Testscript>cat TRUNCATE-PS_TXN.sh
#--------------------------------------------------------------------
# Created by:Kaushlesh Yadav
# Generated on: 15/07/2010
# Job... (4 Replies)
Discussion started by: kaushelsh168
4 Replies
7. Shell Programming and Scripting
Hi,
I'm having a syntax error at line 752: `end of file' unexpected. However, i didn't make any changes on line 752. I just inserted a new code in an existing program. Can anyone please check if there is something wrong with my code:
if
then
lline=`tail -5 $badfile`
... (3 Replies)
Discussion started by: chryz
3 Replies
8. Shell Programming and Scripting
Hi,
i am installing glut-3.5 using that ./mkmkfiles.imake
its showing an error msg as
root@lxdevenv:~/Desktop/openGL/glut-3.5# ./mkmkfiles.imake
./mkmkfiles.imake: line 51: syntax error: unexpected end of file
root@lxdevenv:~/Desktop/openGL/glut-3.5#
actually there are 49 lines in... (3 Replies)
Discussion started by: Ravikishore
3 Replies
9. Shell Programming and Scripting
Hi All,
I have written a korn script (code pasted below). It is giving the error while debugging "new.sh: syntax error at line 62: `end of file' unexpected".
I have re-written the whole code in VI and explored all help related to this error on this Unix forum and tried it. Somehow, I could... (7 Replies)
Discussion started by: schandrakar1
7 Replies
10. Solaris
Hello...
I'm trying to run the sshd script, but I keep geting the Syntax errot message .
Here's the last few lines on the script. set nu in vi shows 58 lines, but I keep getting error referring to line 59. Any help is appreciated.
Thanks,
Remi
else
echo... (4 Replies)
Discussion started by: Remi
4 Replies
VISUDO(8) MAINTENANCE COMMANDS VISUDO(8)
NAME
visudo - edit the sudoers file
SYNOPSIS
visudo [-chqsV] [-f sudoers]
DESCRIPTION
visudo edits the sudoers file in a safe fashion, analogous to vipw(8). visudo locks the sudoers file against multiple simultaneous edits,
provides basic sanity checks, and checks for parse errors. If the sudoers file is currently being edited you will receive a message to try
again later.
There is a hard-coded list of one or more editors that visudo will use set at compile-time that may be overridden via the editor sudoers
Default variable. This list defaults to "/usr/bin/vi". Normally, visudo does not honor the VISUAL or EDITOR environment variables unless
they contain an editor in the aforementioned editors list. However, if visudo is configured with the --with-env-editor option or the
env_editor Default variable is set in sudoers, visudo will use any the editor defines by VISUAL or EDITOR. Note that this can be a
security hole since it allows the user to execute any program they wish simply by setting VISUAL or EDITOR.
visudo parses the sudoers file after the edit and will not save the changes if there is a syntax error. Upon finding an error, visudo will
print a message stating the line number(s) where the error occurred and the user will receive the "What now?" prompt. At this point the
user may enter "e" to re-edit the sudoers file, "x" to exit without saving the changes, or "Q" to quit and save changes. The "Q" option
should be used with extreme care because if visudo believes there to be a parse error, so will sudo and no one will be able to sudo again
until the error is fixed. If "e" is typed to edit the sudoers file after a parse error has been detected, the cursor will be placed on
the line where the error occurred (if the editor supports this feature).
OPTIONS
visudo accepts the following command line options:
-c Enable check-only mode. The existing sudoers file will be checked for syntax errors, owner and mode. A message will be
printed to the standard output describing the status of sudoers unless the -q option was specified. If the check completes
successfully, visudo will exit with a value of 0. If an error is encountered, visudo will exit with a value of 1.
-f sudoers Specify and alternate sudoers file location. With this option visudo will edit (or check) the sudoers file of your choice,
instead of the default, /etc/sudoers. The lock file used is the specified sudoers file with ".tmp" appended to it. In check-
only mode only, the argument to -f may be "-", indicating that sudoers will be read from the standard input.
-h The -h (help) option causes visudo to print a short help message to the standard output and exit.
-q Enable quiet mode. In this mode details about syntax errors are not printed. This option is only useful when combined with
the -c option.
-s Enable strict checking of the sudoers file. If an alias is used before it is defined, visudo will consider this a parse error.
Note that it is not possible to differentiate between an alias and a host name or user name that consists solely of uppercase
letters, digits, and the underscore ('_') character.
-V The -V (version) option causes visudo to print its version number and exit.
ENVIRONMENT
The following environment variables may be consulted depending on the value of the editor and env_editor sudoers variables:
VISUAL Invoked by visudo as the editor to use
EDITOR Used by visudo if VISUAL is not set
FILES
/etc/sudoers List of who can run what
/etc/sudoers.tmp Lock file for visudo
DIAGNOSTICS
sudoers file busy, try again later.
Someone else is currently editing the sudoers file.
/etc/sudoers.tmp: Permission denied
You didn't run visudo as root.
Can't find you in the passwd database
Your userid does not appear in the system passwd file.
Warning: {User,Runas,Host,Cmnd}_Alias referenced but not defined
Either you are trying to use an undeclare {User,Runas,Host,Cmnd}_Alias or you have a user or host name listed that consists solely of
uppercase letters, digits, and the underscore ('_') character. In the latter case, you can ignore the warnings (sudo will not
complain). In -s (strict) mode these are errors, not warnings.
Warning: unused {User,Runas,Host,Cmnd}_Alias
The specified {User,Runas,Host,Cmnd}_Alias was defined but never used. You may wish to comment out or remove the unused alias. In -s
(strict) mode this is an error, not a warning.
Warning: cycle in {User,Runas,Host,Cmnd}_Alias
The specified {User,Runas,Host,Cmnd}_Alias includes a reference to itself, either directly or through an alias it includes. This is
only a warning by default as sudo will ignore cycles when parsing the sudoers file.
SEE ALSO
vi(1), sudoers(5), sudo(8), vipw(8)
AUTHOR
Many people have worked on sudo over the years; this version of visudo was written by:
Todd Miller
See the CONTRIBUTORS file in the sudo distribution (http://www.sudo.ws/sudo/contributors.html) for a list of people who have contributed to
sudo.
CAVEATS
There is no easy way to prevent a user from gaining a root shell if the editor used by visudo allows shell escapes.
BUGS
If you feel you have found a bug in visudo, please submit a bug report at http://www.sudo.ws/sudo/bugs/
SUPPORT
Limited free support is available via the sudo-users mailing list, see http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or
search the archives.
DISCLAIMER
visudo is provided ``AS IS'' and any express or implied warranties, including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose are disclaimed. See the LICENSE file distributed with sudo or
http://www.sudo.ws/sudo/license.html for complete details.
1.8.5 March 14, 2012 VISUDO(8)