Sorry if this has been posted before, I searched but not sure what I really want to do.
I have a file with records that show who has logged into my application:
2003-03-14:I:root: Log_mesg: registered servername:userid. (more after this)
I want to pull out the userid, date and time into... (2 Replies)
Dear All,
I am new to Unix and need your help. I am trying to write b-shell script which will return substr of some variable like this
d="asdfg"
return Substr(d,1,5).
Please help (5 Replies)
What is the more efficient way to do this (awk only and default FS) ?
$ echo "jefe@alm"|awk '{pos = index($0, "@");printf ("USER: %s\n",substr ($0,1,pos-1))}'
USER: jefe
Thx in advance (2 Replies)
Hi,
My input file is
41;2;xxxx;yyyyy....
41;2;xxxx;yyyyy....
41;2;xxxx;yyyyy....
..
..
I need to change the second field value from 2 to 1. i.e.,
41;1;xxxx;yyyyy....
41;1;xxxx;yyyyy....
41;1;xxxx;yyyyy....
..
..
Thanks in advance. (9 Replies)
Hi,
I have a long string like,
aabab|bcbcbcbbc|defgh|paswd123 dedededede|efef|ghijklmn|paswd234 ghghghghgh|ijijii|klllkkk|paswd345 lmlmlmmm|nononononn|opopopopp|paswd456
This string is devided into one space between substrings. This substrings are,
aabab|bcbcbcbbc|defgh|paswd123... (6 Replies)
Hello life savers!!
Is there any way to use substr in awk command for returning one part of a string from declared start and stop point?
I mean I know we have this:
substr(string, start, length)
Do we have anything like possible to use in awk ? :
substr(string, start, stop)
... (9 Replies)
I have a command like this:
listdb ID923 -l |gawk '{if (substr($0,37,1)==1 && NR == 3)print "YES" else if (substr ($0,37,1)==0 && NR == 3) print "NO"}'
This syntax doesn't work. But I was able to get this to work:
listdb ID923 -l |gawk '{if (substr($0,37,1)==1 && NR == 3)print "YES"}'
... (4 Replies)
awk '/^>/{id=$0;next}length>=7 { print id, "\n"$0}' Test.txt
Can I use substr to achieve the same task?
Thanks! (8 Replies)
Discussion started by: Xterra
8 Replies
LEARN ABOUT SUSE
struct_spi_message
STRUCT SPI_MESSAGE(9) Serial Peripheral Interface (S STRUCT SPI_MESSAGE(9)NAME
struct_spi_message - one multi-segment SPI transaction
SYNOPSIS
struct spi_message {
struct list_head transfers;
struct spi_device * spi;
unsigned is_dma_mapped:1;
void (* complete) (void *context);
void * context;
unsigned actual_length;
int status;
struct list_head queue;
void * state;
};
MEMBERS
transfers
list of transfer segments in this transaction
spi
SPI device to which the transaction is queued
is_dma_mapped
if true, the caller provided both dma and cpu virtual addresses for each transfer buffer
complete
called to report transaction completions
context
the argument to complete when it's called
actual_length
the total number of bytes that were transferred in all successful segments
status
zero for success, else negative errno
queue
for use by whichever driver currently owns the message
state
for use by whichever driver currently owns the message
DESCRIPTION
A spi_message is used to execute an atomic sequence of data transfers, each represented by a struct spi_transfer. The sequence is "atomic"
in the sense that no other spi_message may use that SPI bus until that sequence completes. On some systems, many such sequences can execute
as as single programmed DMA transfer. On all systems, these messages are queued, and might complete after transactions to other devices.
Messages sent to a given spi_device are alway executed in FIFO order.
The code that submits an spi_message (and its spi_transfers) to the lower layers is responsible for managing its memory. Zero-initialize
every field you don't set up explicitly, to insulate against future API updates. After you submit a message and its transfers, ignore them
until its completion callback.
COPYRIGHT Kernel Hackers Manual 2.6. July 2010 STRUCT SPI_MESSAGE(9)