03-14-2006
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I'm try to create an executable file to copy a file to a different location.
Help plz.
Thanx. (4 Replies)
Discussion started by: nazehcalil
4 Replies
2. Shell Programming and Scripting
Hi,
I need a shell script that when run should be able to find the geographical location of the system.
can anyone help me with this?
Thanks,
Sundeep (1 Reply)
Discussion started by: eamani_sun
1 Replies
3. Shell Programming and Scripting
Hi people.
I working on a script to check for files that they are suposed not to be on the directory. I mean, inside of each directory it must have some files but some could be wrong, and i want to move the files that are wrong.
Ex:
CSPOTGET edpst/CargadoresSPOT Historicos_Spot_MDI.zip... (4 Replies)
Discussion started by: osramos
4 Replies
4. Shell Programming and Scripting
Hi,
I am using the command find /apps/qualdb/gpcn/scripts/cab_outbound/archive -name 'z*' -mtime +28 -exec rm {} \;
in unix command prompt
for deleting the files in my unix system under the specfied folder. It was succesfull.
But when i running this command inside a shell script name... (2 Replies)
Discussion started by: Jayaram.Nambura
2 Replies
5. Shell Programming and Scripting
Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval. (2 Replies)
Discussion started by: allways4u21
2 Replies
6. Shell Programming and Scripting
I'm writing a bash script that reads a file location from a user, and I'm wondering how to get the script to accept tab to auto complete the directories that are input. (8 Replies)
Discussion started by: Prodiga1
8 Replies
7. Shell Programming and Scripting
hi all
i have a problem how to read file location..I read file as FILE=/home/tmp/new.file.but t is not useful for me.But i want my script read file location where the file is and copy in directory at boot time. Every time of booting files are copied in respective folder.please help !!!!:) (2 Replies)
Discussion started by: shubhig15
2 Replies
8. Shell Programming and Scripting
Hi,
I am using Solaris 10 OS and trying to create shell script that can add input at certain location into a file.
The input that I am trying to put is new domain name
e.g
@newdomain.com
the file contains,
more test01.out
user/zzzz786@st.com/INBOX
user/zzzz@po.com/INBOX... (8 Replies)
Discussion started by: Mr_47
8 Replies
9. Shell Programming and Scripting
Hi
This is my third past and very impressed with previous post replies
Hoping the same for below query
How to find a existing file location and directory location in solaris box (1 Reply)
Discussion started by: buzzme
1 Replies
10. Shell Programming and Scripting
hi,
how can i know whether a command inside an sftp script has failed or not?
i have a sftp expect script
#!/usr/bin/expect
spawn /usr/bin/sftp abc@ftp.abc.com
expect "sftp>"
send "cd dir\r"
expect "sftp>"
send "mput abc.txt\r"
expect "sftp>"
send "mput def.xls\r"
expect "sftp>"... (5 Replies)
Discussion started by: Little
5 Replies
LEARN ABOUT DEBIAN
sys::utmp
Sys::Utmp(3pm) User Contributed Perl Documentation Sys::Utmp(3pm)
NAME
Sys::Utmp - Object(ish) Interface to UTMP files.
SYNOPSIS
use Sys::Utmp;
my $utmp = Sys::Utmp->new();
while ( my $utent = $utmp->getutent() )
{
if ( $utent->user_process )
{
print $utent->ut_user,"
";
}
}
$utmp->endutent;
See also examples/pwho in the distribution directory.
DESCRIPTION
Sys::Utmp provides a vaguely object oriented interface to the Unix user accounting file ( sometimes /etc/utmp or /var/run/utmp). Whilst it
would prefer to use the getutent() function from the systems C libraries it will attempt to provide its own if they are missing.
This may not be the module that you are looking for - there is a User::Utmp which provides a different procedural interface and may well be
more complete for your purposes.
METHODS
new The constructor of the class. Arguments may be provided in Key => Value pairs : it currently takes one argument 'Filename' which will
set the file which is to be used in place of that defined in _PATH_UTMP.
getutent
Iterates of the records in the utmp file returning a Sys::Utmp::Utent object for each record in turn - the methods that are available
on these objects are descrived in the Sys::Utmp::Utent documentation. If called in a list context it will return a list containing the
elements of th Utent entry rather than an object. If the import flag ':fields' is used then constants defining the indexes into this
list will be defined, these are uppercase versions of the methods described in Sys::Utmp::Utent.
setutent
Rewinds the file pointer on the utmp filehandle so repeated searches can be done.
endutent
Closes the file handle on the utmp file.
utmpname SCALAR filename
Sets the file that will be used in place of that defined in _PATH_UTMP. It is not defined what will happen if this is done between two
calls to getutent() - it is recommended that endutent() is called first.
EXPORT
No methods or constants are exported by default.
Exportable constants
These constants are exportable under the tag ':constants':
ACCOUNTING
BOOT_TIME
DEAD_PROCESS
EMPTY
INIT_PROCESS
LOGIN_PROCESS
NEW_TIME
OLD_TIME
RUN_LVL
USER_PROCESS
These are the values that will be found in the ut_type field of the Sys::Utmp::Utent object.
These constants are exported under the tag ':fields' :
UT_USER
UT_ID
UT_LINE
UT_PID
UT_TYPE
UT_HOST
UT_TIME
These provide the indexes into the list returned when "getutent" is called in list context.
BUGS
Probably. This module has been tested on Linux, Solaris, FreeBSD ,SCO Openserver and SCO UnixWare and found to work on those platforms.
If you have difficulty building the module or it doesnt behave as expected then please contact the author including if appropriate your
/usr/include/utmp.h
AUTHOR
Jonathan Stowe, <jns@gellyfish.com>
LICENCE
This Software is Copyright Netscalibur UK 2001,
Jonathan Stowe 2001-2006
This Software is published as-is with no warranty express or implied.
This is free software and can be distributed under the same terms as Perl itself.
SEE ALSO
perl. Sys::Utmp::Utent
perl v5.14.2 2006-10-13 Sys::Utmp(3pm)