04-25-2010
You're welcome. I'm glad I could help you.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Experts,
New Year Greetings to everyone!
Is there a way I can query the filename from the file itself?
I am writing a bunch of similar 'csh' scripts, which differ by the file name and same difference is inside the script.
e.g.
script1.run.csh
....
set vrbl = script1
....... (3 Replies)
Discussion started by: sumitgarg
3 Replies
2. Shell Programming and Scripting
Hi Everyone . i m kinda newbie so spare me if question seems stupid :D
what i want to do is something like this
rsh node1 tail -20 /var/opt/fds/statistics/FSC-InapInterface_2.0_A_1-2006-12-24-0000.stat >> node1.txt
now problem is this that in this case the date was 24th december 2006 but... (5 Replies)
Discussion started by: Dastard
5 Replies
3. Solaris
Hi everyone,
I'm configuring Net-SNMP v5.4 on Solaris 10, sending traps to OpenNMS 1.2.9-0.20061212.0. I'm setting up disk monitoring (% of space free) for 5 directories. Here's what I'm working with:
(snmpd.conf - disk and monitoring portions)
#
# Disk Usage monitoring:
#
disk / 20%... (0 Replies)
Discussion started by: Mariognarly
0 Replies
4. Shell Programming and Scripting
I would like to use the result of a query in another query. How do I redirect/add the output to another variable?
$result = odbc_exec($connect, $query);
while ($row = odbc_fetch_array($result)) {
echo $row,"\n";
}
odbc_close($connect);
?>
This will output hostnames:
host1... (0 Replies)
Discussion started by: hazno
0 Replies
5. Shell Programming and Scripting
Hi All,
I am a newbie to Shell programming and stuck with the folllowing issue:
Here is the code:
#! /bin/sh
if ;
then
echo "Checking if the file is found or not"
fi
On running, I get the following error:
spk265@linax1$ ./shell ./sample/samplenew
./shell: line 3:
I... (3 Replies)
Discussion started by: sh_kk
3 Replies
6. Shell Programming and Scripting
Hi,
I have a requirement as below which needs to be done viz UNIX shell script
(1) I have to connect to an Oracle database
(2) Exexute "SELECT field_status from table 1" query on one of the tables.
(3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies
7. Shell Programming and Scripting
Hi all,
I'm trying to create a script that does the following:
Connect with SQLplus to my oracle db. Do a select 1 from dual; and when I don't get a value back. Than put the $DATE in a logfile.
What I have until now:
#!/bin/bash
# values
GEN_ERR=1 #error 1 code
USER=username... (8 Replies)
Discussion started by: Roadster
8 Replies
8. Shell Programming and Scripting
Hi,
I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database.
For instance:
USER CITY
--------- ----------
A CITY_A
B CITY_B
C ... (2 Replies)
Discussion started by: DevendraG
2 Replies
9. Shell Programming and Scripting
Hi,
I have file with format abcd.gz.20151011.1 , i need to rename as abcd.gz.20151011.we can use move command for one file. How to change multiple files. (3 Replies)
Discussion started by: nag_sathi
3 Replies
10. Shell Programming and Scripting
Hi All,
Please can you help me with below, i have a file with records ( eg of one record below)
Record R1 - The field separtaor between records is | (Pipe)
|123|Mukesh\r\n|Vivek"sharma|
Now i want to do the following for each record in the file
if there is any field ( lets say field... (3 Replies)
Discussion started by: mad_man12
3 Replies
LOGIN(1) Linux Administrator's Manual LOGIN(1)
NAME
login - Begin session on the system
SYNOPSIS
login [ -p ] [ -h host ] [ -H ] [ -f username | username ]
DESCRIPTION
login is used when signing onto a system. If no argument is given, login prompts for the username.
The user is then prompted for a password, where approprate. Echoing is disabled to prevent revealing the password. Only a small number of
password failures are permitted before login exits and the communications link is severed.
If password aging has been enabled for the account, the user may be prompted for a new password before proceeding. He will be forced to
provide his old password and the new password before continuing. Please refer to passwd(1) for more information.
The user and group ID will be set according to their values in the file. There is one exception if the user ID is zero: in this case, only
the primary group ID of the account is set. This should prevent that the system adminitrator cannot login in case of network problems. The
value for $HOME, $SHELL, $PATH, $LOGNAME, and $MAIL are set according to the appropriate fields in the password entry. $PATH defaults to
/usr/local/bin:/bin:/usr/bin:. for normal users, and to /sbin:/bin:/usr/sbin:/usr/bin for root if not other configured. The environment
variable $TERM will be preserved, if it exists (other environment variables are preserved if the -p option is given) or be initialize to
the terminal type on your tty line, as specified in /etc/ttytype.
Then the user's shell is started. If no shell is specified for the user in /etc/passwd, then /bin/sh is used. If there is no directory
specified in /etc/passwd, then / is used (the home directory is checked for the .hushlogin file described above).
login reads the /etc/login.defs(5) configuration file. Please refer to this documenation for options which could be set.
OPTIONS
-p Used by getty(8) to tell login not to destroy the environment
-f Used to skip a second login authentication. This option is deprecated and should not be used. It does specifically not work for
root. Using this option also means, that not all PAM functions are called.
-h Used by other servers (i.e., telnetd(8)) to pass the name of the remote host to login so that it may be placed in utmp and wtmp.
Only the superuser may use this option.
-H Used by other servers (i.e., telnetd(8)) to tell login that printing the hostname should be suppressed in the login: prompt.
FILES
/var/run/utmp - list of current login sessins
/var/log/wtmp - list of previous login sessions
/etc/passwd - user account information
/etc/shadow - encrypted passwords and age information
/etc/motd - system message file
/etc/login.defs - configuration file
SEE ALSO
init(8), getty(8), mail(1), passwd(1), passwd(5), environ(7), shutdown(8), login.defs(5)
BUGS
A recursive login, as used to be possible in the good old days, no longer works; for most purposes su(1) is a satisfactory substitute.
Indeed, for security reasons, login does a vhangup() system call to remove any possible listening processes on the tty. This is to avoid
password sniffing. If one uses the command "login", then the surrounding shell gets killed by vhangup() because it's no longer the true
owner of the tty. This can be avoided by using "exec login" in a top-level shell or xterm.
AUTHOR
Derived from BSD login 5.40 (5/9/89) by Michael Glad (glad@daimi.dk) for HP-UX
Ported to Linux 0.12: Peter Orbaek (poe@daimi.aau.dk)
Added new features: Thorsten Kukuk (kukuk@suse.de)
PAM Login 3.32 2. May 2007 LOGIN(1)