09-16-2006
hi,
thanx.. i got it.. i was able to retrieve the ip aliases using ioctl() using the request SIOCGIFADDR ..
thanx anyway..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm trying to make a script that will automatically read incoming mail, parse the recipient, then send a file off to the recipient.
(Name of file = mail.pl)
#!/usr/bin/perl
$mailDir = "/var/spool/mail/"
$user = print `cat <STDIN> | grep To: | cut -b5-`;
print `elm -s Awaiting Mail $user <... (1 Reply)
Discussion started by: ComTec
1 Replies
2. Programming
Hi.
I have a C program that is using the **environ pointer and I am trying to set up aliases for a system("/bin/ksh") call. This works for other environment variables but not for the aliases. Does anyone know if this can be done? Thanks ahead of time. (1 Reply)
Discussion started by: mluey61
1 Replies
3. UNIX for Dummies Questions & Answers
Is there a way to view what aliases are running on a given session? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies
4. Shell Programming and Scripting
Hello:
i have several server with own etc aliases. right now i want to combine it all into a general etc aliases in a new freebsd server. cause it consist hundred thousand of record user inside how to make a shell script to combine it or configure it.
all etc aliases record example: ... (0 Replies)
Discussion started by: peterLfs
0 Replies
5. UNIX for Dummies Questions & Answers
How come if I set an alias as such:
alias dt 'date "+%Y-%m-%d %H:%M:%S"'
it will work as intended, ie the command 'dt' does prompt the date and time, but not when invoked through a script as such:
#!/bin/sh
alias dt 'date "+%Y-%m-%d %H:%M:%S"'
The OS is FreeBSD 7.1.
Thanks in advance (4 Replies)
Discussion started by: figaro
4 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am new to Unix. I want to know how to setup aliases in Unix. Mean if i write a particular word say scripts then it should take me to scripts directory.
Kindly help. (2 Replies)
Discussion started by: amritansur
2 Replies
7. Solaris
I'm at a bit of a loss here, any help is appreciated...
I have Solaris 10, and in submit.cf, sendmail.cf I have the mail relay setup to our companys relay server which works fine when I type a full email address on the command like (i.e. #echo hello | mail me@work.com).
However, I am trying... (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies
8. Shell Programming and Scripting
Hi all,
I have and alias set in .profile like
alias ll='ls -la'
I am writing a shell script in which i am using "ll" but it gives command not found . Can anyone please tell me how source aliases in the script we write do i need to define it again in every script i write is there any oher... (1 Reply)
Discussion started by: firestar
1 Replies
9. HP-UX
Hi folks,
How can I make an alias in HP-UX? I've tried to add something just like this
bye='exit' (as example), the system accepted but when I write bye in the terminal its return with invalid command. When I make such alias in RedHat or Fedora the system accept it right there, what is the... (7 Replies)
Discussion started by: leo_ultra_leo
7 Replies
10. UNIX for Dummies Questions & Answers
Within a session we have created some aliases. How to unset all the aliases in the session or specific alias? (1 Reply)
Discussion started by: pandeesh
1 Replies
IOCTL(2) System Calls Manual IOCTL(2)
NAME
ioctl, stty, gtty - control device
SYNOPSIS
#include <sgtty.h>
ioctl(fildes, request, argp)
struct sgttyb *argp;
stty(fildes, argp)
struct sgttyb *argp;
gtty(fildes, argp)
struct sgttyb *argp;
DESCRIPTION
Ioctl performs a variety of functions on character special files (devices). The writeups of various devices in section 4 discuss how ioctl
applies to them.
For certain status setting and status inquiries about terminal devices, the functions stty and gtty are equivalent to
ioctl(fildes, TIOCSETP, argp)
ioctl(fildes, TIOCGETP, argp)
respectively; see tty(4).
The following two calls, however, apply to any open file:
ioctl(fildes, FIOCLEX, NULL);
ioctl(fildes, FIONCLEX, NULL);
The first causes the file to be closed automatically during a successful exec operation; the second reverses the effect of the first.
SEE ALSO
stty(1), tty(4), exec(2)
DIAGNOSTICS
Zero is returned if the call was successful; -1 if the file descriptor does not refer to the kind of file for which it was intended.
BUGS
Strictly speaking, since ioctl may be extended in different ways to devices with different properties, argp should have an open-ended dec-
laration like
union { struct sgttyb ...; ... } *argp;
The important thing is that the size is fixed by `struct sgttyb'.
ASSEMBLER
(ioctl = 54.)
sys ioctl; fildes; request; argp
(stty = 31.)
(file descriptor in r0)
stty; argp
(gtty = 32.)
(file descriptor in r0)
sys gtty; argp
IOCTL(2)