Visit Our UNIX and Linux User Community

SunOs problem running crontab -e

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers SunOs problem running crontab -e
# 1  
Old 09-01-2009
SunOs problem running crontab -e


Whenever I run crontab -e from my remote terminal logged onto a SunOS 5.6 machine I get this:

root@beauvert:~> crontab -e


I think I have to set the terminal/editor. These are my environment variables:

root@beauvert:~> set
PATH    /usr/bin:/usr/sbin:/usr/local/bin
argv    ()
cwd     /
dirstack        /
echo_style      bsd
gid     1
group   daemon
history 10
home    /
path    (/usr/sbin /usr/bin)
prompt  %n@%m:%c> 
prompt2 %R? 
prompt3 CORRECT>%R (y|n|e|a)? 
shell   /usr/local/bin/tcsh
shlvl   1
status  0
tcsh    6.07.02
term    xterm
uid     0
user    root
version tcsh 6.07.02 (Astron) 1996-10-27 (sparc-sun-solaris) options 8b,nls,dl,al,rh


I do not know how to set which variables accordingly. Can someone help me?
As well, I seem to accidently have created an envionrment variable named mohit. How do I remove it?


Last edited by DukeNuke2; 09-01-2009 at 07:26 PM..
# 2  
Old 09-01-2009
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums
# 3  
Old 09-01-2009
It does look like crontab -e is putting you into ed(1) rather than vi and the usual fix is to set EDITOR to equal vi, suggest you ensure that when you type vi at the promp you do actually get vi if not that needs fixing otherwise try switching shells, setting EDITOR and running vi and then crontab -e in the alternate shell: e.g.:
$ ksh
$ export EDITOR=vi
$ vi  
# Confirm you are in vi and not ed, then quit from vi, then run:
$ crontab -e

# 4  
Old 09-01-2009
How you ended up running csh as root beats me. Try fixing this problem such that root runs with the shell assigned to root in /etc/passwd , and then things should behave normally.
# 5  
Old 09-04-2009
Originally Posted by methyl
How you ended up running csh as root beats me. Try fixing this problem such that root runs with the shell assigned to root in /etc/passwd , and then things should behave normally.
Thanks for the answers. How do I remove a shell variable? I accidently added one called "mohit". How do I get rid of it?
# 6  
Old 09-04-2009
Originally Posted by mojoman
How do I remove a shell variable? I accidently added one called "mohit". How do I get rid of it?
You don't need to. Shell variables are harmless ...

If you insist and want to stay with tcsh, that should one of these, depending on if the variable is exported or not:
unset mohit
unsetenv mohit

By the way, EDITOR was probably not exported in your environment. That might explain why you were falling back to ed in your initial posting question.

Previous Thread | Next Thread
Test Your Knowledge in Computers #519
Difficulty: Easy
3,201 = 0b110010000001
True or False?

10 More Discussions You Might Find Interesting

1. Solaris

Script problem when running on crontab

Hi guys! I created a backup script that works fine when I run manually, but when I put a crontab job to execute it the result are not the expected. (not a time problem). Here is my script: bash-3.00# cat /bk_tool/ #!/usr/bin/csh clear set DIR_HOST='SCP08' ... (3 Replies)
Discussion started by: andredemartini
3 Replies

2. Shell Programming and Scripting

Issue with SUNOS running sed scripts

Hi I probably dont have GNU extended sed in my SUNOS . and its creating lot of problems ex: a simple sed command like this is not working sed '/WORD/ a\ sample text line 1 \ sample text line 1 ' filename sed: command garbled: /WORD/ a I took precaution to have a new line after... (11 Replies)
Discussion started by: vash
11 Replies

3. Shell Programming and Scripting

Problem with running the "autorep" command via crontab

Hi, The user "MadeInGermany" tried to help on the below post by saying "This has been asked before; see the links below. Get your current LD_LIBRARY_PATH and redefine that in your ksh script! " Thanks for the help. but this did not help. And my post got locked. I can't reply on my previous... (5 Replies)
Discussion started by: girish1428
5 Replies

4. Shell Programming and Scripting

Problem with crontab running a script

I am trying to use the CRON utility in Fedora 11 & CentOS... I intend to run a script which pops up a warning message every hour and i made the following entry using "CRONTAB -e " * * * * * sh /bin/ But this does not seem to be running. Another thing to note is that,... (4 Replies)
Discussion started by: Vabiosis
4 Replies

5. UNIX for Advanced & Expert Users

Crontab is not running!!!

Hi experts, need your helpo. after editing the crontab while saving the file it says- "/tmp/crontabRlaauT" 1 line, 77 characters cron may not be running - call your system administrator And i checked after certain time. script in cron is not running. I got a mail in user saying... (1 Reply)
Discussion started by: thepurple
1 Replies

6. Shell Programming and Scripting

problem running shell script (for oracle export) in crontab

Hello Gurus, I've been tasked with solving a problem at my new job and I'm stumped. We've got a script that dynamically builds an oracle export parameter files and then runs export from the shell. it runs fine when using the shell, but will NOT run (fails in one spot everytime) when entered... (1 Reply)
Discussion started by: jsheehan223
1 Replies

7. Shell Programming and Scripting

Sorting problem (SunOS 5.9 / KSH).

Hi, Can someone tell me why the "LargeFile" is coming first before the smaller files. Is there any way to list the files based on size column. ls -g| sort -k 4 -rw-r--r-- 1 user 6117910528 Apr 28 15:04 LargeFile -rw-r--r-- 1 user 6136832 May 30 07:23 my_20080530.tar -rw-r--r-- ... (2 Replies)
Discussion started by: kesari
2 Replies

8. Solaris

SunOS 5.8 sftp-BatchMode Problem

Hi Gurus I have to connect from a SunOS 5.10 to a 5.8 using sftp in BatchMode. For this, I have generated a Public-Key (ssh-keygen -b 1024 -P "" -t dsa) on the 5.10 and saved it in ~remote-user/.ssh/authorized-keys on the 5.8. Then, running either one of ssh or sftp, it asks for the... (0 Replies)
Discussion started by: unilover
0 Replies

9. Solaris

Problem in SunOS 5.9

In Solaris (SunOS 5.9) a problem is encountered as : The patch command doesnt patch a file greater than or equal to 1MB after it is deleted or changed. Could anyone know the reason. Is this problem related to patch or Sun OS. If so what may be the solution. (3 Replies)
Discussion started by: SankarV
3 Replies

10. UNIX for Advanced & Expert Users

Telnet Problem with Solaris (SunOS 5.7)

Hi, I have been facing a telnet problem with our SunOS 5.7 box. Initially we were facing porblems in login both from the console as well as through telnet. The machine was hard-booted after which login from console is possible, but telnet connection is not. The error that is displayed is... (1 Reply)
Discussion started by: manoj_gopal
1 Replies

Featured Tech Videos