11-17-2009
Franklin52 Thank you.........
Hi Franklin your code works perfectly, So much thanks to you and others who are all replied to my post.
Momo.reino, really last two days I am stuck with many issues, I really sorry for not looking into the manual for that particular cmd.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hello everybody!
I want to create a file with permissions for read, write, and execute to everybody using C, so I write this code:
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int main(){
int fileDescriptor;
fileDescriptor =... (2 Replies)
Discussion started by: csnmgeek
2 Replies
2. Shell Programming and Scripting
Can someone help me on this?
I'm creating an Insert stmt script but Oracle does not accept blanks values. How can I insert the word null between two commas? I'm guessing awk or sed.
Is there a good post or site with easy to understand info on awk and sed? I'm really new to unix scripts :D
... (5 Replies)
Discussion started by: ystee
5 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
I am new to unix scripting, please help me in solving this assignment..
I have a scenario, as follows:
1. i have a text file(read1.txt) with the following data
sairam,123
kamal,122
etc..
2. I have to write a unix... (6 Replies)
Discussion started by: G.K.K
6 Replies
4. Shell Programming and Scripting
Hi
I have lines like this
a=1, b=2, c=3,
a=1, d=4, e=5, b=225,
I need to extract the b=nnn... value. I dont know how many other entries will be before and after it in each line. Ive tried a basic line like
awk '/b=/, $NF ~ /,/ ' myfile.txt
but I think that it doesnt care which comma it... (5 Replies)
Discussion started by: rebelbuttmunch
5 Replies
5. Shell Programming and Scripting
The log reads as follows.
fname1;lname1;eid1;addr;pincode1;
fname2;lname2;eid2;addr2;pincode2;
fname3;lname3;eid3;addr3;pincode3;
fname4;lname4;eid;addr4;pincode4;
how do i extract only fname and save it in an array
similarly for lname and so on
i tried reading a file and cutting each... (5 Replies)
Discussion started by: vkca
5 Replies
6. Programming
Hi,
from the manual
listen(2): listen for connections on socket - Linux man page
It has a parameter called backlog and it limits the maximum length of queue of pending list.
If I set backlog to 128, is it means no more than 128 packets can be handled by server?
If I have three... (3 Replies)
Discussion started by: sehang
3 Replies
7. Shell Programming and Scripting
Hi,
I have a No Delimiter variable length text file with following schema -
Column Name Data length
Firstname 5
Lastname 5
age 3
phoneno1 10
phoneno2 10
phoneno3 10
sample data - ... (16 Replies)
Discussion started by: Gaurav Martha
16 Replies
8. Shell Programming and Scripting
I want a string between two delimeter like ( ) from file.
Input File,
2007_08_07_IA-0100-014_(January).PDF
2007_08_07_IA-0100-031_(January February March
April June July).PDF
2008-02-28_KR-1022-003_(January
febuary
march
april
may).CSV
Output File,
January
January February... (19 Replies)
Discussion started by: Pratik Majithia
19 Replies
9. Shell Programming and Scripting
Hi All,
I'm stuck-up in finding a way to skip the delimiter which come within double quotes using awk or any other better option. can someone please help me out.
Below are the details:
Delimited: |
Sample data: 742433154|"SYN|THESIS MED CHEM PTY.... (2 Replies)
Discussion started by: BrahmaNaiduA
2 Replies
10. Shell Programming and Scripting
Hi All,
I have my data like below
"1","abc,db","hac,aron","4","5"
Now I need to extract 1,2,4th columns
Output should be like
"1",abc,db","4"
Am trying to use cut command but not able to get the results.
Thanks in advance. (4 Replies)
Discussion started by: weknowd
4 Replies
SMB(4) BSD Kernel Interfaces Manual SMB(4)
NAME
smb -- SMB generic I/O device driver
SYNOPSIS
device smb
DESCRIPTION
The smb character device driver provides generic i/o to any smbus(4) instance. In order to control SMB devices, use /dev/smb? with the
ioctls described below. Any of these ioctl commands takes a pointer to struct smbcmd as its argument.
#include <sys/types.h>
struct smbcmd {
char cmd;
int count;
u_char slave;
union {
char byte;
short word;
char *byte_ptr;
short *word_ptr;
struct {
short sdata;
short *rdata;
} process;
} data;
};
The slave field is always used, and provides the address of the SMBus slave device to talk to. The slave address is specified in the seven
most significant bits (i.e. ``left-justified''). The least significant bit of the slave address must be zero.
Ioctl Description
SMB_QUICK_WRITE The QuickWrite command just issues the device address with write intent to the bus, without transferring any data.
SMB_QUICK_READ The QuickRead command just issues the device address with read intent to the bus, without transferring any data.
SMB_SENDB The SendByte command sends the byte provided in the cmd field to the device.
SMB_RECVB The ReceiveByte command reads a single byte from the device which will be returned in the cmd field.
SMB_WRITEB The WriteByte command first sends the byte from the cmd field to the device, followed by the byte given in data.byte.
SMB_WRITEW The WriteWord command first sends the byte from the cmd field to the device, followed by the word given in data.word.
Note that the SMBus byte-order is little-endian by definition.
SMB_READB The ReadByte command first sends the byte from the cmd field to the device, and then reads one byte of data from the
device. The returned data will be stored in the location pointed to by data.byte_ptr.
SMB_READW The ReadWord command first sends the byte from the cmd field to the device, and then reads one word of data from the
device. The returned data will be stored in the location pointed to by data.word_ptr.
SMB_PCALL The ProcedureCall command first sends the byte from the cmd field to the device, followed by the word provided in
data.process.sdata. It then reads one word of data from the device, and returns it in the location pointed to by
data.process.rdata.
SMB_BWRITE The BlockWrite command first sends the byte from the cmd field to the device, followed by count bytes of data that are
taken from the buffer pointed to by data.byte_ptr. The SMBus specification mandates that no more than 32 bytes of data
can be transferred in a single block read or write command. This value is available in the constant SMB_MAXBLOCKSIZE.
SMB_BREAD The BlockRead command first sends the byte from the cmd field to the device, and then reads count bytes of data that from
the device. These data will be returned in the buffer pointed to by data.byte_ptr.
The read(2) and write(2) system calls are not implemented by this driver.
ERRORS
The ioctl(2) commands can cause the following driver-specific errors:
[ENXIO] Device did not respond to selection.
[EBUSY] Device still in use.
[ENODEV] Operation not supported by device (not supposed to happen).
[EINVAL] General argument error.
[EWOULDBLOCK] SMBus transaction timed out.
SEE ALSO
ioctl(2), smbus(4)
HISTORY
The smb manual page first appeared in FreeBSD 3.0.
AUTHORS
This manual page was written by Nicolas Souchu.
BSD
February 6, 2009 BSD