02-28-2008
how to take input at the startup script!!
Hi all,
I am trying to modify a startup script...
The problem is that i am unable to figure out how to take inputs from the user at the startup screen and proceed with the processing accordingly...
Eg:
$ echo "this is a test" (typically this would produce the output)...
$ echo "this is a test" >/dev/msglog (this is used to produce the same output before shell is initialized)...
Similarly,i wanted to know the equivalent for the read statement!!!!
eg:
$ read x (usually reads <something> to variable x)
How can i incorporate the same at the startup??
thanks
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
New in Unix, I am adding a line "route add 57.14.y.y 57.14.x.x" every day after rebooting the system. Where can I add the line so during boot up (the system is re-started every day by design (???) the line is executed? (I tried the /etc/rc2.d/S90 but for some reason the line needs to be added... (2 Replies)
Discussion started by: texaspanama
2 Replies
2. HP-UX
Hi,
I want a script to execute as soon as a user logs in(instead of directing to his home directory). i know that i have to mention the path of script in the user's .profile to execute this, but not sure where and what to edit. I just tried and was unsuccesful.
Kindly provide the code that i... (4 Replies)
Discussion started by: sridharr83
4 Replies
3. AIX
I am using AIX 5.3 in P6 machine.
I have a script "test.sh", when i run it manually it runs properly.
I want to run the script automatically when system starts.
I kept the script in /etc/rc.d/init.d and also in /etc/rc.d/rc2.d but it is not working.
Do i have to write it in inittab instead of... (1 Reply)
Discussion started by: pchangba1
1 Replies
4. UNIX for Dummies Questions & Answers
Hello there!
I need help.
Everytime I login to my ssh, i see this:
-bash: .export: command not found
-bash: .export: command not found
-bash: .export: command not found
-bash: .export: command not found
any help ?
thanks (0 Replies)
Discussion started by: fbauto1
0 Replies
5. AIX
Hi
I need the below script to be started whenever I reboot my aix server ?
#cat cdbegin
/cdirect/cdunix/ndm/bin/cdpmgr -i /cdirect/cdunix/ndm/cfg/cbspsdb01/initparm.cfg
Please suggest how to add this to the startup ? (2 Replies)
Discussion started by: samsungsamsung
2 Replies
6. Shell Programming and Scripting
Hello,
I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall:
I regularly need to delete files from many directories.
A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies
7. Shell Programming and Scripting
Hi all,
I'm writing a script to stop & start oracle:
su - oracle -c "sqlplus / as sysdba" -c "shutdown immediate">> ${log} 2>&1
The {log} refers to the log file. The part in bold gives error:
/usr/sbin/shutdown: Only root can run /usr/sbin/shutdown
Pls suggest how to correct this.
... (5 Replies)
Discussion started by: frum
5 Replies
8. Shell Programming and Scripting
I copied the script from an AskUbuntu post -
#!/bin/bash
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop Tomcat server
### END INIT INFO
... (14 Replies)
Discussion started by: Hijanoqu
14 Replies
9. Shell Programming and Scripting
I can't quite find a clear answer on how to properly write a start up script. Does anybody have any ideas?? (3 Replies)
Discussion started by: Huitzilopochtli
3 Replies
msglog(7D) Devices msglog(7D)
NAME
msglog - message output collection from system startup or background applications
SYNOPSIS
/dev/msglog
DESCRIPTION
Output from system startup ("rc") scripts is directed to /dev/msglog, which dispatches it appropriately.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsr |
+-----------------------------+-----------------------------+
|Interface Stability |Stable |
+-----------------------------+-----------------------------+
SEE ALSO
syslogd(1M), syslog(3C), attributes(5), sysmsg(7D)
NOTES
In the current version of Solaris, /dev/msglog is an alias for /dev/sysmsg. In future versions of Solaris, writes to /dev/msglog may be
directed into a more general logging mechanism such as syslogd(1M).
syslog(3C) provides a more general logging mechanism than /dev/msglog and should be used in preference to /dev/msglog whenever possible.
SunOS 5.10 13 Oct 1998 msglog(7D)