09-07-2009
In the sed command, the path for the file is not mentioned, eg., /var/log/messages and also, this is an automated process, which should will be running in an hourly basis. So, that we can't specifically check with the date, like sep 6.
I hope it makes sense.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a program that i have to run by cron. The program needs user input. So i have to automate that in a littke script.
start of script program.sh:
result=program.log; export result
echo Program starting : `date` >> $result
/usr/local/program >> $result
echo Program running : `date` >>... (11 Replies)
Discussion started by: erwinspeybroeck
11 Replies
2. Shell Programming and Scripting
I am trying to use a here document to automate testing a perl script however when the perl script hits a system(perl subscript.pl) call, input is no longer entered into this subscript.
here is my script
$ cat test.sh
#ksh
for testcase
do
program <<-EOF | tee -a funcscnlog.log
y... (3 Replies)
Discussion started by: hogger84
3 Replies
3. Shell Programming and Scripting
I know that this has a bad title, but I'm not sure how to sum it up well.
(And I'm new to Linux in general, so please excuse any incorrect terminology :o)
Anyway, I'm trying to create a script that gets whatever folder you're in, and then does a command with that directory as an argument. I... (2 Replies)
Discussion started by: droppedonjapan
2 Replies
4. UNIX for Advanced & Expert Users
I would like to automate script where i do not have to manually insert the username and password I wrote two different scripts but not able to achieve the results: here's to scripts i wrote
#!/bin/bash
cd /var/tmp
/home/server/steve/pca --askauth -idx
/opt/app/bin/expect <<EOF
expect... (1 Reply)
Discussion started by: sam786
1 Replies
5. Shell Programming and Scripting
I would like to automate script where i do not have to manually insert the username and password I wrote two different scripts but not able to achieve the results: here's to scripts i wrote
#!/bin/bash
cd /var/tmp
/home/server/steve/pca --askauth -idx
/opt/app/bin/expect <<EOF
expect... (3 Replies)
Discussion started by: sam786
3 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I require to develop some script which will continuously be looking for mails from some specific mail addresses on AIX server. Once any such mail arrives, the process will look into the mail subject and mail body to search for some keywords like success or failure, filename etc.... (3 Replies)
Discussion started by: vivek8220
3 Replies
7. Shell Programming and Scripting
Hi All,
./procdure.ksh which opens the below the menu, I want to build a script which will press 4 and run the Sector Data Automatically (instead of pressing option 4 manually)
Is there any way for this, please let me know...
1) FX Rates MDU 9) Fidessa Cash... (7 Replies)
Discussion started by: niceboykunal123
7 Replies
8. Shell Programming and Scripting
Hi All,
Can I automate a script when some one trying to 'vi' (open) a file.
For Example, I am having a file named 'SecuredShell.sh'.
when a user types " vi SecuredShell.sh " in unix command prompt a script named secure.sh needs to be automated.
Can this be possible. if Yes please guide... (2 Replies)
Discussion started by: little_wonder
2 Replies
9. Shell Programming and Scripting
Hi all,
I need to execute a script on a remote machine that are connected to the network.The basic requirement is to write a script which will login in remote machine and then execute the other script automatically placed in remote machine.So that I need to execute the remote machine script... (3 Replies)
Discussion started by: smartgupta
3 Replies
10. Windows & DOS: Issues & Discussions
Dear all,
I I want to login to my Linux machine using putty and then run some script from Windows machine.we can do it after loging it and then execute the script by typing it in putty command line screen. but I want to automate it.So whenever I will fire this script,it will do the following... (4 Replies)
Discussion started by: smartgupta
4 Replies
WHO(1) BSD General Commands Manual WHO(1)
NAME
who -- display who is on the system
SYNOPSIS
who [-abHmqsTu] [am I] [file]
DESCRIPTION
The who utility displays information about currently logged in users. By default, this includes the login name, tty name, date and time of
login and remote hostname if not local.
The options are as follows:
-a Equivalent to -bTu, with the exception that output is not restricted to the time and date of the last system reboot.
-b Write the time and date of the last system reboot.
-H Write column headings above the output.
-m Show information about the terminal attached to standard input only.
-q ``Quick mode'': List the names and number of logged in users in columns. All other command line options are ignored.
-s Show the name, line and time fields only. This is the default.
-T Indicate whether each user is accepting messages. One of the following characters is written:
+ User is accepting messages.
- User is not accepting messages.
? An error occurred.
-u Show idle time for each user in hours and minutes as hh:mm, '.' if the user has been idle less than a minute, and ``old'' if the user
has been idle more than 24 hours.
am I Equivalent to -m.
By default, who gathers information from the file /var/run/utx.active. An alternate file may be specified which is usually /var/log/utx.log
(or /var/log/utx.log.[0-6] depending on site policy as utx.log can grow quite large and daily versions may or may not be kept around after
compression by ac(8)). The utx.log file contains a record of every login, logout, crash, shutdown and date change since utx.log was last
truncated or created.
If /var/log/utx.log is being used as the file, the user name may be empty or one of the special characters '|', '}' and '~'. Logouts produce
an output line without any user name. For more information on the special characters, see getutxent(3).
ENVIRONMENT
The COLUMNS, LANG, LC_ALL and LC_TIME environment variables affect the execution of who as described in environ(7).
FILES
/var/run/utx.active
/var/log/utx.log
/var/log/utx.log.[0-6]
EXIT STATUS
The who utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
last(1), users(1), w(1), getutxent(3)
STANDARDS
The who utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').
HISTORY
A who command appeared in Version 1 AT&T UNIX.
BSD
February 11, 2012 BSD