Hello EssJay,
This is a bit complicated, but when working is a fine method of automating remote administration.
First, you must establish trusted roles using /etc/hosts.equiv and/or /.rhosts files to enable the rsh processing. See the man pages for this.
Next you will need to build a...
Hello Bi,
Sambones gave you some really good info that will probably solve your problem, but didn't give you another good tip that might help. Whenever you think the shell might muck up your code and you really need that special character to go as text, then use a backslash to tell the shell...
Hello Bi,
I prefer to use ex in this instance where the text must go at the beginning of the file AND the file must be saved with the same name when completed.
Suppose the insert text is a file named Insert.txt and must go into Test.log. A command file for ex must also be created and I'll...
Hello,
The secret to cgi programming is that the output of your program or script must be in html format and thus create an html document. Compared to normal scripting, you will printf lots of html markup code which would otherwise be unnecessary to the operation of the script.
I've...
Cruel,
So right. I normally use 16 or 17 to set up a child process that kills a read after a period of time. It works great for lists that need to refresh, but you might also want user input.
I have never tried to define a kill signal(never had the need), but included them in case you...
Hello Cruel,
Your trap thinking should work, but do you only want to save on a ^S signal or most any signal that would abort the script?
I suggest that you should consider the save as a normal interrupt action during the input process. It would look like this:
trap1 () {
# ^C trap...
Hello,
My mistake! The '/' and '/w ' prevent command garbled errors.
Anyway the correct sed format(that works in solaris 2.5.1) is:
sed -n '/'match string'/w 'output_file input_file
Why this is correct is beyond me, since the man pages don't seem to indicate this.
Later!
Charlie Ehler
Hello Rvarman,
As far as I know you can telnet to the machine and even supply the userid, but the software will still ask for the password at the console. Various attempts to pass the password like in a script were all ignored. This seems to be a security feature in at least Sun Solaris...
Hello Daedelus,
I thought you might want to know who the user really is so the "who am i" command will tell you the original logon name even after multiple su's.
Later!
Charlie Ehler
Hello,
It appears that this line is lifted from a Korn shell script although it could also be Bourne. In it the sed command is configured not to write to standard output(the -n). sed is getting its input from the file represented by the variable ${SRVLOG} and that sed is writing the line...
Hello Dan,
Hope this one will help. I used a Bourne shell script and ex to solve the problem.
Create Replace.sh in your home directory
Insert:
#!/bin/sh
HomePath=`pwd`
echo “Please enter the replacement directory path”
read DirPath
if [ -d $DirPath ]
then
echo “Please enter the...
Hello Dan,
Hope this one will help. I used a Bourne shell script and ex to solve the problem.
Create Replace.sh in your home directory
Insert:
#!/bin/sh
HomePath=/path/to/homedir
echo “Please enter the replacement directory path”
read DirPath
if [ -d $DirPath ]
then
echo “Please...
Hello Dan,
This one is a bit sticky, so I don't usually recommend it from the root directory. It seems that grep(at least in Solaris 4.5.1) will get lost in an ELF file and some others I'm sure.
Anyway, try: grep yourstring */*/*/*
What happens is grep will search all files as...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.