what does this command do ? as in
does this command just make sure everything in the file is executed?
or does it flush the file?
Actually this is used on a file in a progress database but I believe it is a unix command? (2 Replies)
I have AIX5.1
I have been trying to learn how to truncate the /var/adm/wtmp file.
I have seen several things on google actually but don't quite understand. I also searched your forums but couldn't find it.
one says this ">/var/adm/wtmp
Is that all I do?
I have a seperate question also. I was... (1 Reply)
Hello everybody it's me again.
I have a procces that is writing in a 'file1' automatically but i want to truncate 'file1' to a filesize 'x' that mean if the 'file1' size is 'x' i want to delete the first lines while the last lines are being writed, that have sence?
in the process are an... (1 Reply)
I have one file which first line is blank and second line has some data.
$cat filename
output:
30-MAY-07
I want to store 30-MAY-07 value in one variable.
for that I wrote
var="`head -2 filename`"
It will give that result but I want to truncate the first line which is blank.
plz help. (2 Replies)
I have a file in which I need to truncate 15th field to have only one character
like Put --> P
and if i have no value in 15th field, it should be "O" (Other)
would really appreciate the reponses, thnx in advance:b: (2 Replies)
Hi
In unix able to connect to oracle database and create table ,when rerun ,if table exist ,truncate that table.Any idea how to do that
a.sh
----
sqlplus -s datadmin/password <<EOF
create table xx(col1 number,
col2...
);
exit;
EOF
I... (1 Reply)
Hello all.
I would like to make a script (or two shell scripts) that will do the following.
I need the maximum file name and directory name to be 38 characters long.
As well, if shortening the file name ends up making all of the files in that directory have the same name, then I would like... (9 Replies)
Hi,
I want to truncate a string variable, returned in the script. In perl I used the below and it worked.
BRNo=BR12345
$BR = substr($BRNo, 2, 7)
How can I do it in sh.
Thanks ! (8 Replies)
Hello
Using BASH under Ubuntu 10.4 lts + XMonad
My script is almost perfect but i'm stuck at the last hurdle:
I need a sort of modified 'echo' which truncates its output to the width of the terminal
I can find the terminal's width with 'stty size' but i dont know how to then convert input... (2 Replies)
hi All,
how to recover the truncate file in unix.
Thanks!:wall: (2 Replies)
Discussion started by: krbala1985
2 Replies
LEARN ABOUT REDHAT
ether_line
ETHER_ATON(3) Linux Programmer's Manual ETHER_ATON(3)NAME
ether_aton, ether_ntoa, ether_ntohost, ether_hosttonn, ether_line, ether_ntoa_r, ether_aton_r - Ethernet address manipulation routines
SYNOPSIS
#include <netinet/ether.h>
char *
ether_ntoa(const struct ether_addr *addr);
struct ether_addr *
ether_aton(const char *asc);
int
ether_ntohost(char *hostname, const struct ether_addr *addr);
int
ether_hostton(const char *hostname, struct ether_addr *addr);
int
ether_line(const char *line, struct ether_addr *addr,
char *hostname);
/* GNU extensions */
char *
ether_ntoa_r(const struct ether_addr *addr, char *buf);
struct ether_addr *
ether_aton_r(const char *asc, struct ether_addr *addr);
DESCRIPTION
ether_aton() converts the 48-bit Ethernet host address asc from the standard hex-digits-and-colons notation into binary data in network
byte order and returns a pointer to it in a statically allocated buffer, which subsequent calls will overwrite. ether_aton returns NULL if
the address is invalid.
The ether_ntoa() function converts the Ethernet host address addr given in network byte order to a string in standard hex-digits-and-colons
notation, omitting leading zeroes. The string is returned in a statically allocated buffer, which subsequent calls will overwrite.
The ether_ntohost() function maps an Ethernet address to the corresponding hostname in /etc/ethers and returns non-zero if it cannot be
found.
The ether_hostton() function maps a hostname to the corresponding Ethernet address in /etc/ethers and returns non-zero if it cannot be
found.
The ether_line() function parses a line in /etc/ethers format (ethernet address followed by whitespace followed by hostname; '#' introduces
a comment) and returns an address and hostname pair, or non-zero if it cannot be parsed. The buffer pointed at by hostname must be suffi-
ciently long, e.g., have the same length as line.
The functions ether_ntoa_r and ether_aton_r are re-entrant threadsafe versions of ether_ntoa and ether_aton respectively, and do not use
static buffers.
The structure ether_addr is defined in net/ethernet.h as:
struct ether_addr {
u_int8_t ether_addr_octet[6];
}
BUGS
The glibc 2.2.5 implementation of ether_line() is broken.
CONFORMING TO
BSD 4.3, SunOS
SEE ALSO ethers(5)BSD 2002-07-20 ETHER_ATON(3)