Sponsored Content
Full Discussion: A terrific quote:
The Lounge What is on Your Mind? A terrific quote: Post 303042454 by vbe on Wednesday 25th of December 2019 12:08:15 PM
Old 12-25-2019
Merry Xmas!
This User Gave Thanks to vbe For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Capturing Data between first quote and next quote

I have input file like RDBMS FALIURE UTY8703 'USER_WORK.TEST' .HIghest return code '12' I want to parse data which comed between first quote till next quote USER_WORK.TEST can you please suggest how to do that (4 Replies)
Discussion started by: scorp_rahul23
4 Replies

2. Shell Programming and Scripting

double-quote inside double-quote

hey all, i made a simple .sh like this: echo "<style media="screen" type="text/css">@import url("main.css");</style>" but the output is: <style media=screen type=text/css>@import url(main.css);</style> i want to keep double-quotes, can anyone help me? thanks (3 Replies)
Discussion started by: indraf
3 Replies

3. Shell Programming and Scripting

Quote and variable

The command line bellow works fine by itself. /opt/csw/bin/rsync -azq --delete -e "ssh -i /.ssh/ss" /home/ me@myaccount.storage.com:/home/ Now I would like to introduce some variable into it and make a .sh file such as bellow and it does not work anymore. I guess the part -e "ssh -i /.ssh/ss" has... (4 Replies)
Discussion started by: ngungo
4 Replies

4. Shell Programming and Scripting

Regex in grep to match all lines ending with a double quote (") OR a single quote (')

Hi, I've been trying to write a regex to use in egrep (in a shell script) that'll fetch the names of all the files that match a particular pattern. I expect to match the following line in a file: Name = "abc" The regex I'm using to match the same is: egrep -l '(^) *= *" ** *"$' /PATH_TO_SEARCH... (6 Replies)
Discussion started by: NanJ
6 Replies

5. Shell Programming and Scripting

replacing a quote in some lines with multiple quote fields

i want to replace mistaken quotes in line starting with tag 300 and relocate the quote in the correct position so the input is 223;25 224;20100428064823;1;0;0;0;0;0;0;0;8;1;3;9697;18744;;;;;;;;;;;; 300;X;Event:... (3 Replies)
Discussion started by: wradwan
3 Replies

6. Shell Programming and Scripting

quote problem

Hi Everyone hwo are you i have one file "abc.txt" which contains record like this "1","2","3" "3","4","5" now i want to change above 2 to 5 so i write the code as awk ' BEGIN{FS=","} { if(NR==1) { print $1",5","$3 } else { print $0 } ' abc.txt but the outpute is "1",5,"3"... (5 Replies)
Discussion started by: aishsimplesweet
5 Replies

7. UNIX for Dummies Questions & Answers

To quote or not

My question is, "Do I not understand, or is my information out of date?" I am trying to just be a student, rtfm'ing. I am working on my work systems. Is it simply that the book was printed in 2002 and a lot has changed since then, or did I miss something? Working in Korn Shell. I have been... (5 Replies)
Discussion started by: g.j.huebschman
5 Replies

8. Shell Programming and Scripting

Replacing Double Quote in Double Quote incsv file

Hi All , We have source data file as csv file and since data could contain commas ,each attribute is quoted into double quotes.However problem is that some of the attributa data also contain double quotes which is converted to double double quote while creating csv file XLs data : ... (2 Replies)
Discussion started by: Shalini Badal
2 Replies

9. Shell Programming and Scripting

Replacing all but the first and last double quote in a line with a single quote with awk

From: 1,2,3,4,5,This is a test 6,7,8,9,0,"This, is a test" 1,9,2,8,3,"This is a ""test""" 4,7,3,1,8,"""" To: 1,2,3,4,5,This is a test 6,7,8,9,0,"This; is a test" 1,9,2,8,3,"This is a ''test''" 4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Discussion started by: Michael Stora
5 Replies

10. What is on Your Mind?

A terrific historical video about UNIX circa 1982 with well known names.

Enjoy folks... AT&T Archives: The UNIX Operating System - YouTube (2 Replies)
Discussion started by: wisecracker
2 Replies
PCI(4)							   BSD Kernel Interfaces Manual 						    PCI(4)

NAME
pci -- generic PCI driver SYNOPSIS
device pci DESCRIPTION
The pci driver provides a way for userland programs to read and write PCI configuration registers. It also provides a way for userland pro- grams to get a list of all PCI devices, or all PCI devices that match various patterns. Since the pci driver provides a write interface for PCI configuration registers, system administrators should exercise caution when granting access to the pci device. If used improperly, this driver can allow userland applications to crash a machine or cause data loss. The pci driver implements the PCI bus in the kernel. It enumerates any devices on the PCI bus and gives PCI client drivers the chance to attach to them. It assigns resources to children, when the BIOS does not. It takes care of routing interrupts when necessary. It reprobes the unattached PCI children when PCI client drivers are dynamically loaded at runtime. KERNEL CONFIGURATION
The pci device is included in the kernel as described in the SYNOPSIS section. The pci driver cannot be built as a kld(4). IOCTLS
The following ioctl(2) calls are supported by the pci driver. They are defined in the header file <sys/pciio.h>. PCIOCGETCONF This ioctl(2) takes a pci_conf_io structure. It allows the user to retrieve information on all PCI devices in the system, or on PCI devices matching patterns supplied by the user. The call may set errno to any value specified in either copyin(9) or copyout(9). The pci_conf_io structure consists of a number of fields: pat_buf_len The length, in bytes, of the buffer filled with user-supplied patterns. num_patterns The number of user-supplied patterns. patterns Pointer to a buffer filled with user-supplied patterns. patterns is a pointer to num_patterns pci_match_conf structures. The pci_match_conf structure consists of the following elements: pc_sel PCI domain, bus, slot and function. pd_name PCI device driver name. pd_unit PCI device driver unit number. pc_vendor PCI vendor ID. pc_device PCI device ID. pc_class PCI device class. flags The flags describe which of the fields the kernel should match against. A device must match all specified fields in order to be returned. The match flags are enumerated in the pci_getconf_flags structure. Hopefully the flag values are obvious enough that they do not need to described in detail. match_buf_len Length of the matches buffer allocated by the user to hold the results of the PCIOCGETCONF query. num_matches Number of matches returned by the kernel. matches Buffer containing matching devices returned by the kernel. The items in this buffer are of type pci_conf, which consists of the following items: pc_sel PCI domain, bus, slot and function. pc_hdr PCI header type. pc_subvendor PCI subvendor ID. pc_subdevice PCI subdevice ID. pc_vendor PCI vendor ID. pc_device PCI device ID. pc_class PCI device class. pc_subclass PCI device subclass. pc_progif PCI device programming interface. pc_revid PCI revision ID. pd_name Driver name. pd_unit Driver unit number. offset The offset is passed in by the user to tell the kernel where it should start traversing the device list. The value passed out by the kernel points to the record immediately after the last one returned. The user may pass the value returned by the kernel in subsequent calls to the PCIOCGETCONF ioctl. If the user does not intend to use the offset, it must be set to zero. generation PCI configuration generation. This value only needs to be set if the offset is set. The kernel will compare the current generation number of its internal device list to the generation passed in by the user to deter- mine whether its device list has changed since the user last called the PCIOCGETCONF ioctl. If the device list has changed, a status of PCI_GETCONF_LIST_CHANGED will be passed back. status The status tells the user the disposition of his request for a device list. The possible status values are: PCI_GETCONF_LAST_DEVICE This means that there are no more devices in the PCI device list after the ones returned in the matches buf- fer. PCI_GETCONF_LIST_CHANGED This status tells the user that the PCI device list has changed since his last call to the PCIOCGETCONF ioctl and he must reset the offset and generation to zero to start over at the beginning of the list. PCI_GETCONF_MORE_DEVS This tells the user that his buffer was not large enough to hold all of the remaining devices in the device list that possibly match his criteria. It is possible for this status to be returned, even when none of the remaining devices in the list would match the user's criteria. PCI_GETCONF_ERROR This indicates a general error while servicing the user's request. If the pat_buf_len is not equal to num_patterns times sizeof(struct pci_match_conf), errno will be set to EINVAL. PCIOCREAD This ioctl(2) reads the PCI configuration registers specified by the passed-in pci_io structure. The pci_io structure con- sists of the following fields: pi_sel A pcisel structure which specifies the domain, bus, slot and function the user would like to query. If the spe- cific bus is not found, errno will be set to ENODEV and -1 returned from the ioctl. pi_reg The PCI configuration register the user would like to access. pi_width The width, in bytes, of the data the user would like to read. This value may be either 1, 2, or 4. 3-byte reads and reads larger than 4 bytes are not supported. If an invalid width is passed, errno will be set to EINVAL. pi_data The data returned by the kernel. PCIOCWRITE This ioctl(2) allows users to write to the PCI specified in the passed-in pci_io structure. The pci_io structure is described above. The limitations on data width described for reading registers, above, also apply to writing PCI configura- tion registers. FILES
/dev/pci Character device for the pci driver. SEE ALSO
pciconf(8) HISTORY
The pci driver (not the kernel's PCI support code) first appeared in FreeBSD 2.2, and was written by Stefan Esser and Garrett Wollman. Sup- port for device listing and matching was re-implemented by Kenneth Merry, and first appeared in FreeBSD 3.0. AUTHORS
Kenneth Merry <ken@FreeBSD.org> BUGS
It is not possible for users to specify an accurate offset into the device list without calling the PCIOCGETCONF at least once, since they have no way of knowing the current generation number otherwise. This probably is not a serious problem, though, since users can easily nar- row their search by specifying a pattern or patterns for the kernel to match against. BSD
January 3, 2008 BSD
All times are GMT -4. The time now is 01:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy