Oh man you made mistake accessing evn variable inside your script.
First when you set a variable at your prompt, like i did a=10, then the same won't be available inside the script you are running.
The prompt shell is a different process and the script you are running is a different process.
If you are planning to share it, you have it to make it as environment variable by using export.
Check the output i have posted, i was not able to access a inside test.sh, but in the prompt i am getting it
This User Gave Thanks to kumaran_5555 For This Post:
Hi,
New to the forum, Great site, I can learn a lot from here!! :cool:
I would like to know how to automate a command that checks the Sybase database's are "alive" on an hourly basis, and mails outlook if they are not (1 Reply)
Hi,
I file that has all the status for one day (24hours). Now what I want to do is to count the occurence of a string in its output hourly like for example count occurance of successful or asynchronous clear destinon for every hour and redirect it to file. Please see sample file below. Please... (2 Replies)
I need to capture the following data on an hourly basis through cronjob scheduling:-
1. load averages
2. Total no. of processes.
3. CPU state
4. Memory
5. Top 3 process details.
All the above information is available through the command 'top'. But here we need to automate the same and... (4 Replies)
I have a text file with a number "001". I am trying to change this number every hour and increment by "1". So every hour it would add +1 to that number. I am able to change the file with sed but unable to have it increment it by "1" without me adding that to the sed command. Any help is... (23 Replies)
dear all,
pls help on this script..
i have many files which will be created every mins in particular directory.
i want to grep a particular string from only for unique hour files.
from the below code i want to grep a string from only 9th hour files .
Ex files:
-rw-r--r-- 1 root ... (5 Replies)
Hello,
I have a command which runs continuously and creates output to STDOUT. Now, in unix, if I create logging for this command, it would create a single log file and keep on updating. As there is so much data filled in it, I would want to break the log files periodically. In this instance, say... (4 Replies)
Hi..
I need to run the script on hourly basis.
How do I write the crontab on hourly basis i.e, 9:00, 10:00.....22:00.. 23:00 hours
Please let me know if the below is correct one for crontab on hourly basis.
00 * * * * ksh myscript.ksh > /dev/null
Regards,
John (3 Replies)
Hi,
I am trying to calculate avg response time on hourly basis from the log file which has millions of records.
As of now I am trying with creating temp file which will have lines with unique id and start time and end time and after that another script will run on this temp file to... (7 Replies)
Hello,
My system is generating two files every 15 minutes and file names are given automatically as below. (98,99,89,90 are the sequence numbers)
File1_09242013131016_000000098
File1_09242013131516_000000099
File2_09242013124212_000000089
File2_09242013124712_000000090
I want to combine... (6 Replies)
Discussion started by: phoenex11
6 Replies
LEARN ABOUT ULTRIX
rhosts
rhosts(5) File Formats Manual rhosts(5)Name
rhosts - list of hosts that are logically equivalent to the local host
Syntax
/$HOME/.rhosts
Description
The file allows a user who has an account on the local host to log in from a remote host without supplying a password. It also allows
remote copies to the local host.
If the file exists, it is located in a user's home directory. It is not a mandatory file, however.
The format of a file entry is:
hostname [username]
The hostname is the name of the remote host from which the user wants to log into the local host. The username is the user's login name on
the remote host. If you do not specify a user name, the user must have the same login name on both the remote and local hosts.
The host names listed in the file may optionally contain the local BIND domain name. For more information on BIND, see the Guide to the
BIND/Hesiod Service.
If a user is logged in to and wants to log in to a host called without supplying a password, she must:
o Have an account on
o Create a file in her home directory on
o Specify host1 ginger as an entry in the file.
If has the same login on both and she can simply specify host1 in her entry. You can allow the superuser of a remote system to log in
to your system without password protection or perform a remote copy by having a file in the root ( / ) directory, but it is not recom-
mended.
In addition to having a file, the superuser needs a terminal entry in the file for each pseudoterminal configured in the system. The
secure entry looks similar to the following:
ttyp3 none network secure
See the reference page for more information.
Examples
The following is a sample file for the user It is located in her home directory on She also has accounts on the hosts called and Her login
name on and is the same as on but her login on is
To enable to log in to from and without supplying a password, her on should contain the following entries:
machine1
system1 gordon
host3
See Alsohosts.equiv(5), ttys(5)
Introduction to Networking and Distributed System Services
rhosts(5)