Tag Archives: NAME

PL/SQL heartbeat Query has errors

By sdohn

Hello, I want to query something simple which works as a standalone sqlplus query perfectly:

Table statements:

Code:

ALTER TABLE MP$PATHLOADER.ISALIVE
DROP PRIMARY KEY CASCADE;

DROP TABLE MP$PATHLOADER.ISALIVE CASCADE CONSTRAINTS;

CREATE TABLE MP$PATHLOADER.ISALIVE
(
ISALIVE_PK NUMBER,
INSERTTS TIMESTAMP (6) NOT NULL,
UPDATETS TIMESTAMP (6) NOT NULL,
VERSIONID NUMBER NOT NULL,
NAME VARCHAR2 (256 CHAR) NOT NULL,
ACTIVE NUMBER (1) DEFAULT 0 NOT NULL
);

CREATE UNIQUE INDEX MP$PATHLOADER.ISALIVE_PK
ON MP$PATHLOADER.ISALIVE (ISALIVE_PK);

ALTER TABLE MP$PATHLOADER.ISALIVE
ADD ( CONSTRAINT ISALIVE_PK PRIMARY KEY (ISALIVE_PK)
USING INDEX MP$PATHLOADER.ISALIVE_PK);


A Testvalue as follow:

Code:

Insert into MP$PATHLOADER.ISALIVE
(ISALIVE_PK,
INSERTTS, UPDATETS, VERSIONID, NAME, ACTIVE)
Values
(3, TO_TIMESTAMP('01/21/2013 15:29:02,000000','MM/DD/YYYY HH24:MI:SS,FF'), TO_TIMESTAMP('01/24/2013 13:49:40,013000','MM/DD/YYYY HH24:MI:SS,FF'), 8781, '010123vb',
1);


And now the query for getting the differences in minutes between the timestamps:

Code:

(SELECT ABS (
TO_NUMBER (TO_CHAR (updatets, 'dd')) * 24 * 60
+ TO_NUMBER (TO_CHAR (updatets, 'hh24')) * 60
+ TO_NUMBER (TO_CHAR (updatets, 'mi'))
- TO_NUMBER (TO_CHAR (SYSDATE, 'dd')) * 24 * 60
- TO_NUMBER (TO_CHAR (SYSDATE, 'hh24')) * 60
- TO_NUMBER (TO_CHAR (SYSDATE, 'mi')))
AS BACKLOG_MINUTES
FROM MP$PATHLOADER.ISALIVE
WHERE active = '1');


But then in a PL/SQL Script this does not further work anymore:

Code:

SET SERVEROUTPUT ON
SET FEEDBACK OFF

DECLARE
CTABLES VARCHAR2 (20);
BEGIN
EXECUTE IMMEDIATE
(SELECT ABS (
TO_NUMBER (TO_CHAR (updatets, 'dd')) * 24 * 60
+ TO_NUMBER (TO_CHAR (updatets, 'hh24')) * 60
+ TO_NUMBER (TO_CHAR (updatets, 'mi'))
- TO_NUMBER (TO_CHAR (SYSDATE, 'dd')) * 24 * 60

From: http://www.unix.com/programming/221397-pl-sql-heartbeat-query-has-errors.html

President Obama to Welcome the 2012 Commander in Chief Bowl Winners to the White House

By The White House

WASHINGTON, DC— On Friday, April 12th, President Obama will welcome the United States Naval Academy Football Team to the White House to present them with the 2012 Commander in Chief’s Trophy.

The Commander in Chief's trophy was established in 1972. It is awarded to the service academy with the best overall record against the other two service academies. Every year since 1984, except 1993 when there was no outright winner, the President has personally presented the Trophy to members of the victorious Academy's football team at the White House.

This event will be open press. Members of the media who wish to cover this event must send NAME, MEDIA OUTLET, PHONE AND EMAIL for each person planning to cover the event to media_affairs@who.eop.gov by 12:00PM ET Wednesday, April 10th. NOTE: Members of the media who do not have a White House hard pass must also submit their full name, date of birth, Social Security number, gender, country of birth, country of citizenship and current city and state of residence. If we are able to accommodate your request for credentials, we will send a confirmation with further instructions and logistical details.

…read more

Source: FULL ARTICLE at The White House Press Office

DHCPserver in LDAP objectClass=dhcpServer not available

By darktux

Hi,

i would like to bind ein dhcpserver to the LDAP. I have here to systems. One Gentoo and one Ubuntu 12.04 LTS. On both systems LDAP is running without problems. So i would like to add the DHCP-Server (is on the same machine) to LDAP.

Ok, i have done this, but the DHCP-Server can’t start, because there is an wrong, or not available objectclass sounds “dhcpServer”. I’ve testet this on both maschines, and there are the same problems. So i think i’ve done something wrong. In the “dhcp.schema” i can find this ojectclass, but when i will add this objectclass, i can’t find it to choose.

Code:

objectclass ( 2.16.840.1.113719.1.203.6.12
NAME 'dhcpServer'
DESC 'DHCP Server Object'
SUP top
MUST (cn $ dhcpServiceDN)
MAY (dhcpVersion $ dhcpImplementation $ dhcpHashBucketAssignment $ dhcpDelayedServiceParameter $ dhcpMaxClientLeadTime $ dhcpFailOverEndp$
X-NDS_CONTAINMENT ('o' 'ou' 'dc') )


My dhcpconfig:

Code:

ldap-server "localhost";
ldap-port 389;
ldap-base-dn "ou=dhcp,ou=services,dc=tux,dc=local";
ldap-dhcp-server-cn "192.168.2.0";
ldap-method dynamic;
ldap-debug-file "/var/log/dhcp-ldap-startup.log";


When i start the dhcp-server:

Code:

Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=192.168.2.0,ou=dhcp,ou=services,dc=tux,dc=local))
Configuration file errors encountered -- exiting


And yes this entry is there, but not with this ojectclass.

Here is my ldapobject:

Code:

dn: cn=192.168.2.0,ou=dhcp,ou=services,dc=tux,dc=local
objectClass: top
objectClass: dhcpOptions
objectClass: dhcpSubnet
cn: 192.168.2.0
dhcpNetMask: 24
dhcpRange: 192.168.2.2 192.168.2.100
dhcpOption: domain-name "tux.local"
dhcpOption: domain-name-servers 192.168.2.1, 8.8.8.8
dhcpOption: routers 192.168.2.1
dhcpOption: netbios-name-servers 192.168.2.1
dhcpOption: netbios-node-type 4
dhcpOption: subnet-mask 255.255.255.0
dhcpStatements: default-lease-time 8000
dhcpStatements: max-lease-time 9000


What should i do to add the right ojectclass to this?

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Problems with fetching data from Oracle database

By kumarjt

Here’s a database query which looks up the NAME column of PRODUCT table


SELECT NAME FROM PRODUCT ;


And this query retrieves me the following output
SUGAR
COCOA
HONEY
WHEAT
CABBAGE
CAULI FLOWER
[6 rows selected]
Please note the last record CAULI FLOWER contains TWO blank spaces between the two words.

Now I want to do the same using Unix script and I wrote the following :
set -A prod_list `sqlplus -s USER/PWD@DB <<!
SET HEADING OFF ;
SET NEWPAGE NONE ;
SET FEEDBACK OFF ;
SET LINESIZE 4000 ;
SET WRAP OFF ;
SELECT NAME FROM PRODUCT ;
!
`
and then queried the prod_list array to find 7 instead of 6 entries
for product in ${prod_list[@]} ; do
echo $product
done
The output is like
SUGAR
COCOA
HONEY
WHEAT
CABBAGE
CAULI
FLOWER
7 items in the array. 😮
My guess is the TWO interim spaces within the last record value is splitting the record in two seperate records
at that point of time when I am trying to fetch the records via sqlplus (ie., via Unix).
Can this behavior be overridden ? If yes how ?
Also we tried to use a SQL cursor to fetch the values into unix , but we do not know exactly how to do it. 🙁
Can anybody help us on that too ?

Please note :
Unix version : Korn Shell
OS : Linux
Database : Oracle 11g

Thanks
Kumarjit.

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Columns Built in awk Variables don't export

By newbie2010

I need to export the built in awk variables for columns so that they are available for the rest of the script. This is what I have so far:


cat /tmp/test | eval `awk '{print "export NAME="$1; print "export NAME2="$2;}'`
echo Host is "$NAME" and Host2 is "$NAME2"


When I run bash -x to debug, the variables do get assigned but then when the echo command runs they come up empty. I need to have these variables assigned so that the entire script can make use of them. Any ideas would be greatly appreciated.

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Version of OpenSSL being used

By CHoggarth

Hello

I’m relatively new to technologies like Apache & ssl but have some years
experience with Unix. My question concerns the version of OpenSSL which is
genuinely being used on our server & how is that set.

The server is running Solaris 10. I’ll show output from various commands:

Code:

:/usr/local/ssl # pkginfo -l SMCossl
PKGINST: SMCossl
NAME: openssl
CATEGORY: application
ARCH: sparc
VERSION: 1.0.1c
BASEDIR: /usr/local
VENDOR: The OpenSSL Group
PSTAMP: Steve Christensen
INSTDATE: Aug 17 2012 07:27
EMAIL: steve@smc.vnet.net
STATUS: completely installed
FILES: 1871 installed pathnames
1 shared pathnames
43 directories
32 executables
30745 blocks used (approx)

:/usr/local/ssl #


Code:

:/usr/local/ssl # openssl version -a
OpenSSL 1.0.1c 10 May 2012
built on: Sun May 13 18:44:13 EDT 2012
platform: solaris-sparcv9-gcc
options: bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) idea(int) blowfish(ptr)
compiler: gcc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -
DDSO_DLFCN -DHAVE_DLFCN_H -m32 -mcpu=ultrasparc -O3 -fomit-frame-
pointer -Wall -DB_ENDIAN -DBN_DIV2W -DOPENSSL_BN_ASM_MONT -DSHA1
_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DGHASH_ASM
OPENSSLDIR: "/usr/local/ssl"
:/usr/local/ssl #


But if I run telnet xxx.xxx.xxx.xxx 80 & OPTIONS / HTTP1.0 from our network it reports 0.9.8x:

Code:

HTTP/1.1 200 OK
Date: Tue, 19 Feb 2013 10:20:37 GMT
Server: Apache/2.2.23 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8x DAV/2
Allow: POST,OPTIONS,GET,HEAD
Vary: Accept-Encoding
Content-Length: 0
Connection: close
Content-Type: text/html

Connection to host lost.

W:>


I’ve been advised to use OPTIONS / HTTP1.0 to determine which version is genuinely being used.

We have in the past installed SSL by package (the most recent being 1.0.1) & source (presumably the most recent being 0.9.8x).

I need to upgrade SSL on this server & I would like to use the 1.0.1 stream (I understand packages are more likely to be available for this & that’s certainly easier to install). But I can’t figure out why the system is really using 0.9.8x when the server itself is saying that 1.0.1 is being used.

I am assuming that the OPTIONS / HTTP1.0 command is giving me the true version.

Can anyone clarify what might be happening & advise how I can start using 1.0.1?

Thanks, Chris

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

President Obama to Honor Recipients of the 2012 Citizens Medal

By The White House

Recipients from across the country will visit the White House to receive Presidential award for exemplary service to their fellow citizens

WASHINGTON, DC – On February 15, 2013, President Obama will welcome to the White House the recipients of the 2012 Presidential Citizens Medal, the nation’s second-highest civilian honor.

“It is my distinguished honor to award these individuals the 2012 Citizens Medal for their commitment to public service,” said President Obama. “Their selflessness and courage inspire us all to look for opportunities to better serve our communities and our country.”

This event will be open press and begin at 10:45AM ET. Members of the media who wish to cover this event must send NAME, MEDIA OUTLET, PHONE AND EMAIL for each person planning to cover the event to media_affairs@who.eop.gov by Wednesday, February 13th at 5:00 PM ET. If we are able to accommodate your request for credentials, we will send a confirmation with further instructions and logistical details after the RSVP deadline passes.

NOTE: Members of the media who do not have a White House hard pass must also submit their full name (including middle name), date of birth, Social Security number, gender, country of birth, country of citizenship and current city and state of residence.

The Citizens Medal was established in 1969 to recognize American citizens who have performed exemplary deeds of service for their country or their fellow citizens. President Obama is recognizing Americans whose work has had a significant impact on their communities but may not have garnered national attention. The President called on members of the public to nominate people in their lives who have performed exemplary deeds of service outside of their regular jobs, including individuals:

Who have a demonstrated commitment to service in their own community or in communities farther from home. Someone who has engaged in activities that have had an impact in their local community, on a community or communities elsewhere in the United States, or on fellow citizens living or stationed around the world.

Who have helped their country or their fellow citizens through one or more extraordinary acts. Individuals who have demonstrated notable skill and grace, selflessly placed themselves in harm’s way, taken unusual risks or steps to protect others, made extraordinary efforts to further a national goal, or otherwise conducted themselves admirably when faced with unusually challenging circumstances.

Whose service relates to a long-term or persistent problem. Individuals who have made efforts to combat stubbornly persistent problems that impact entire communities; for example, those who have taken innovative steps to address hunger, homelessness, the dropout crisis, lack of access to health care, and other issues that plague too many Americans.

Whose service has had a sustained impact on others’ lives and provided inspiration for others to serve. The ideal nominee for a Citizens Medal is a person whose work has had a meaningful and lasting impact on the lives of others.

For more information on the President’s Citizens Medal and to nominate someone for the 2013 Citizens Medal, visit www.whitehouse.gov/citizensmedal.

Nearly 6,000 public nominations …read more
Source: White House Press Office

How to produce a executable Oracle script from bash script?

By jediwannabe

Hi here’s my code

Code:


${ORACLE_HOME}/bin/sqlplus /nolog <<!EOF
--step 5 create db script start
set feedback off
set heading off
set echo off
conn / as sysdba
spool ${ORACLE_SID}_db_link.sql

SELECT 'CREATE '||DECODE(U.NAME,'PUBLIC','public ')||'DATABASE LINK '||CHR(10)
||DECODE(U.NAME,'PUBLIC',Null, 'SYS','',U.NAME||'.')|| L.NAME||chr(10)
||'CONNECT TO ' || L.USERID || ' IDENTIFIED BY "'||L.PASSWORD||'" USING
'''||L.HOST||''''
||chr(10)||';' TEXT
FROM SYS.LINK$ L, SYS.USER$ U
WHERE L.OWNER# = U.USER#;

spool off

set feedback on
set heading on
set echo on

!EOF


here’s the output where i run the script

Code:

[oracle@TU-RH5 manual_upgrade]$ export ORACLE_SID=SUPERB
[oracle@TU-RH5 manual_upgrade]$ /home/oracle/chunhung/NI/manual_upgrade/create_db_link.sh

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Feb 5 17:59:16 2013

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

SQL> SQL> SQL> SQL> SQL> Connected.
SQL> SQL> SQL> 2 3 4 5 6 7
CREATE DATABASE LINK
SUPERB_ADMIN.UEM_CBS_DBLINK
CONNECT TO ABC_ADMIN IDENTIFIED BY "" USING
'/s01/oracle/product/10.2.0/db_1'
;

SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


my output file SUPERB_db_link.sql

looks like the following

Code:

SQL>
SQL> SELECT 'CREATE '||DECODE(U.NAME,'PUBLIC','public ')||'DATABASE LINK '||CHR(10)
2 ||DECODE(U.NAME,'PUBLIC',Null, 'SYS','',U.NAME||'.')|| L.NAME||chr(10)
3 ||'CONNECT TO ' || L.USERID || ' IDENTIFIED BY "'||L.PASSWORD||'" USING
4 '''||L.HOST||''''
5 ||chr(10)||';' TEXT
6 FROM SYS.LINK$ L, SYS.USER$ U
7 WHERE L.OWNER# = U.USER#;

CREATE DATABASE LINK
SUPERB_ADMIN.UEM_CBS_DBLINK
CONNECT TO ABC_ADMIN IDENTIFIED BY "" USING
'/s01/oracle/product/10.2.0/db_1'
;

SQL>
SQL> spool off


unfortunately this is not what I want.

what I want is

Code:

CREATE DATABASE LINK
SUPERB_ADMIN.UEM_CBS_DBLINK
CONNECT TO ABC_ADMIN IDENTIFIED BY "" USING
'/s01/oracle/product/10.2.0/db_1'
;


would really appreciate if someone could help me on this!

thanks a lot!

Source: FULL ARTICLE at The UNIX and Linux Forums

Find out which eth or device belongs to interface "port 1 PCI 4"

By pabloli150

Hi,

I´ve given only this info to configure a network interface : “port 1 PCI 4″

I´ve been searching for any kind of relationship in the system which allow me to find the etc that must be configured…

Please, could anybody help me?


rhxx:#/root# lspci |grep -i "PCI BRIDGE"
00:01.0 PCI bridge: Intel Corporation 7300 Chipset PCI Express Port 1 (rev 01)
00:02.0 PCI bridge: Intel Corporation 7300 Chipset PCI Express Port 2 (rev 01)
00:03.0 PCI bridge: Intel Corporation 7300 Chipset PCI Express Port 3 (rev 01)
00:04.0 PCI bridge: Intel Corporation 7300 Chipset PCI Express Port 4 (rev 01)
00:05.0 PCI bridge: Intel Corporation 7300 Chipset PCI Express Port 5 (rev 01)
00:06.0 PCI bridge: Intel Corporation 7300 Chipset PCI Express Port 6 (rev 01)
00:07.0 PCI bridge: Intel Corporation 7300 Chipset PCI Express Port 7 (rev 01)
00:1c.0 PCI bridge: Intel Corporation 631xESB/632xESB/3100 Chipset PCI Express Root Port 1 (rev 09)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d9)
03:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Upstream Port (rev 01)
03:00.3 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express to PCI-X Bridge (rev 01)
04:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E1 (rev 01)
04:01.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E2 (rev 01)
04:02.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E3 (rev 01)
05:00.0 PCI bridge: Broadcom EPB PCI-Express to PCI-X Bridge (rev c3)
07:00.0 PCI bridge: Broadcom EPB PCI-Express to PCI-X Bridge (rev c3)
0b:00.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)
0c:00.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)
0c:01.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)
0c:09.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)
17:00.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)
18:01.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)
18:02.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)
18:08.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)
18:09.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)
18:0a.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)

1: lo: mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
10: bond0: mtu 1500 qdisc noqueue
link/ether f4:ce:46:af:cd:90 brd ff:ff:ff:ff:ff:ff
11: eth0: mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
link/ether f4:ce:46:af:cd:90 brd ff:ff:ff:ff:ff:ff
12: eth1: mtu 1500 qdisc noop qlen 1000
link/ether f4:ce:46:af:cd:94 brd ff:ff:ff:ff:ff:ff
13: eth2: mtu 1500 qdisc noop qlen 1000
link/ether f4:ce:46:af:2b:f8 brd ff:ff:ff:ff:ff:ff
14: eth3: mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
link/ether f4:ce:46:af:cd:90 brd ff:ff:ff:ff:ff:ff
15: eth4: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 18:a9:05:58:d3:da brd ff:ff:ff:ff:ff:ff
16: eth5: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 18:a9:05:58:d3:dc brd ff:ff:ff:ff:ff:ff

rhxx:#/root# ifconfig -a
bond0 Link encap:Ethernet HWaddr F4:CE:46:AF:CD:90
inet addr:10.66.217.107 Bcast:10.66.217.255 Mask:255.255.255.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:10012841565 errors:0 dropped:0 overruns:0 frame:0
TX packets:4901081627 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:15137886459705 (13.7 TiB) TX bytes:326799353229 (304.3 GiB)

eth0 Link encap:Ethernet HWaddr F4:CE:46:AF:CD:90
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:787344365 errors:0 dropped:0 overruns:0 frame:0
TX packets:4787181439 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1183000109168 (1.0 TiB) TX bytes:318289788084 (296.4 GiB)
Interrupt:164

eth1 Link encap:Ethernet HWaddr F4:CE:46:AF:CD:94
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:228

eth2 Link encap:Ethernet HWaddr F4:CE:46:AF:2B:F8
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:101

eth3 Link encap:Ethernet HWaddr F4:CE:46:AF:CD:90
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:9225497257 errors:0 dropped:0 overruns:0 frame:0
TX packets:113900200 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13954886436835 (12.6 TiB) TX bytes:8509566257 (7.9 GiB)
Interrupt:165

eth4 Link encap:Ethernet HWaddr 18:A9:05:58:D3:DA
inet addr:10.66.229.66 Bcast:10.66.231.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3906476 errors:0 dropped:0 overruns:0 frame:0
TX packets:1764 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:271575556 (258.9 MiB) TX bytes:143603 (140.2 KiB)
Interrupt:169 Memory:ca000000-ca012100

eth5 Link encap:Ethernet HWaddr 18:A9:05:58:D3:DC
inet addr:10.129.140.33 Bcast:10.129.140.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:119742 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24656016 (23.5 MiB) TX bytes:1536 (1.5 KiB)
Interrupt:177 Memory:cc000000-cc012100

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1961734 errors:0 dropped:0 overruns:0 frame:0
TX packets:1961734 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8363537860 (7.7 GiB) TX bytes:8363537860 (7.7 GiB)

KERNEL=="eth0", SYSFS{address}=="f4:ce:46:af:cd:90", NAME="eth0"
KERNEL=="eth1", SYSFS{address}=="f4:ce:46:af:cd:94", NAME="eth1"
KERNEL=="eth2", SYSFS{address}=="f4:ce:46:af:2b:f8", NAME="eth2"
KERNEL=="eth3", SYSFS{address}=="f4:ce:46:af:cd:90", NAME="eth3"
KERNEL=="eth4", SYSFS{address}=="18:a9:05:58:d3:da", NAME="eth4"
KERNEL=="eth5", SYSFS{address}=="18:a9:05:58:d3:dc", NAME="eth5"

#KERNEL=="eth?", SYSFS{address}=="f4:ce:46:af:cd:90", NAME="eth0"
#KERNEL=="eth?", SYSFS{address}=="f4:ce:46:af:cd:94", NAME="eth1"
#KERNEL=="eth?", SYSFS{address}=="f4:ce:46:af:2b:f8", NAME="eth2"
#KERNEL=="eth?", SYSFS{address}=="f4:ce:46:af:cd:90", NAME="eth3"
#KERNEL=="eth?", SYSFS{address}=="18:a9:05:58:d3:da", NAME="eth4"
#KERNEL=="eth?", SYSFS{address}=="18:a9:05:58:d3:dc", NAME="eth5"

lspci -t

-[0000:00]-+-00.0
+-01.0-[0000:03-0a]--+-00.0-[0000:04-09]--+-00.0-[0000:05-06]----00.0-[0000:06]----00.0
| | +-01.0-[0000:07-08]----00.0-[0000:08]----00.0
| | -02.0-[0000:09]--
| -00.3-[0000:0a]--
+-02.0-[0000:29]--
+-03.0-[0000:2a]--
+-04.0-[0000:17-27]----00.0-[0000:18-27]--+-01.0-[0000:25-27]--
| +-02.0-[0000:22-24]--
| +-08.0-[0000:19-1b]--+-00.0
| | -00.1
| +-09.0-[0000:1c-1e]--+-00.0
| | -00.1
| -0a.0-[0000:1f-21]--+-00.0
| -00.1
+-05.0-[0000:28]--
+-06.0-[0000:0b-15]----00.0-[0000:0c-15]--+-00.0-[0000:13-15]--+-00.0
| | -00.1
| +-01.0-[0000:10-12]--+-00.0
| | -00.1
| -09.0-[0000:0d-0f]--+-00.0
| -00.1
+-07.0-[0000:16]--
+-10.0
+-10.1
+-10.2
+-10.3
+-11.0
+-11.3
+-13.0
+-15.0
+-16.0
+-1c.0-[0000:02]----00.0
+-1d.0
+-1d.1
+-1d.2
+-1d.3
+-1d.7
+-1e.0-[0000:01]--+-03.0
| +-04.0
| +-04.2
| +-04.4
| -04.6
--More--


Thanks

Regards

Source: FULL ARTICLE at The UNIX and Linux Forums

Yacc rogram

By zolafencerhello, actually i want to generate rgram in yacc able to do do several operations separated by ‘;’ and after show all the results separated by ‘;’ again.
My code do just one operations and i couldn’ t find solution to do several ones separated by ‘;’. I thought may be i can do a do… while but i don’t know how to do it for my example. If someone can help me please.
here is my .y for just one operation

%{ double vbltable[26]; %}

%union {
double dval ;
int vblno; }

%token NAME
%token NUMBER

%type expression

%%
statement_list:
statement ‘n’
| statement_list statement ‘n’
;

statement:
NAME ‘=’ expression { vbltable[$1] = $3; }
| expression { printf(“est %gn”, $1); }
;

expression:
expression expression ‘+’ { $$ = $1 + $2; }
| expression expression ‘-‘ { $$ = $1 – $2; }
| expression expression ‘*’ { $$ = $1 * $2; }
| expression expression ‘/’ {if($2 == 0.0)
printf(“erreur ! Division par 0”);
else
$$ = $1 / $2; }
| ‘(‘ ‘-‘ expression ‘)’ { $$ = -$3; }
| NUMBER { $$ = $1; }
| NAME { $$ = vbltable[$1]; }
;
%%

int yyerror() { printf(“erreur”) ; }
int main () { yyparse(); }

and here is my .l

%{
#include “y.tab.h”
#include
extern double vbltable[26];
%}

%%

([0-9]+|([0-9]*”.”[0-9]+)) { yylval.dval = atof(yytext); return NUMBER; }
t; { ; }
” ” { ; }
[a-z] { yylval.vblno = yytext[0] – ‘a’ ; return NAME;}
“$” { return 0;
/* symb. de retour pour fin de fichier */}
n { return yytext[0]; }
. { return yytext[0]; }

%%

thanks
Source: The UNIX and Linux Forums