Anyone know how to use SED to append a comma to the end of each line
example:
field1,field2,field3,field4
If i Cat /textfile ---- How can i append the end of /textfile with a comman? (8 Replies)
I know it sounds simple, but I want to e-mail the last 6 lines of a log file, which I have tailed into logresults.txt. I'm using
echo -e "Subject:server results\nFrom:server log <user@domain.com>\n"`cat logresults.txt` | sendmail -t user@domain.com
which works, but the body of the e-mail has... (4 Replies)
Hello to all,
On aix, I want to identify a term on a line in a file and then add a word at the end of the line identified. I do not want the word to be added when the line contains the symbol "#".
I use the following command, but it deletes the term identified then adds the word.
#sed... (4 Replies)
I am looking to change a data file into a javascript string and this is the code that I am using:
sed -i '' -e 's/^/str += "/' -e 's/$/";/' file.xml
The first part
-e 's/^/str += "/'
works as intended, but the second part
-e 's/$/";/'
adds an additional newline to my file, so that instead of... (3 Replies)
Hi folks,
Using shell, I am trying the append comma to every line of text.
the requirement is like, I have to open the txt file in unix and read line by line and should add comma at the end of every word to make it single line
txt file
-------
abc@gmail.com
bcd@gmail.com... (7 Replies)
Hello,
I have to add a new line at the end of a File on Solaris-System:
I think my script should be right, because I evaluated it to other threads. However the script does not what I am expected it should do.
My file might look like this:
Line1
Line2
Line3
And my script could... (7 Replies)
Hi,
I have a File, which have multiple rows.
Like below
123456 Test1 FNAME JRW#$% PB MO Approver XXXXXX. YYYY
123457 Test2 FNAME JRW#$% PB MO Super XXXXXX. YYYY
123458 Test3 FNAME JRW#$% PB MO Approver XXXXXX. YYYY
I want to search a line which contains PB MO Approver and append... (2 Replies)
Hi guys,
I have to append the word count of a file at the end of the file name like this - > "filename_2345" where 2345 is the word count of "filename". How do i achieve this using one command ? I am not allowed to store the word count in a variable and then concatenate. Request your... (1 Reply)
Discussion started by: peter2312
1 Replies
LEARN ABOUT DEBIAN
awrite
awrite(9E) Driver Entry Points awrite(9E)NAME
awrite - asynchronous write to a device
SYNOPSIS
#include <sys/uio.h>
#include <sys/aio_req.h>
#include <sys/cred.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
intprefixawrite(dev_t dev, struct aio_req *aio_reqp, cred_t *cred_p);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). This entry point is optional. Drivers that do not support an awrite() entry point should use
nodev(9F)PARAMETERS
dev Device number.
aio_reqp Pointer to the aio_req(9S) structure that describes where the data is stored.
cred_p Pointer to the credential structure.
DESCRIPTION
The driver's awrite() routine is called to perform an asynchronous write. getminor(9F) can be used to access the minor number component of
the dev argument. awrite() may use the credential structure pointed to by cred_p to check for superuser access by calling drv_priv(9F).
The awrite() routine may also examine the uio(9S) structure through the aio_req structure pointer, aio_reqp. awrite() must call
aphysio(9F) with the aio_req pointer and a pointer to the driver's strategy(9E) routine.
No fields of the uio(9S) structure pointed to by aio_req, other than uio_offset or uio_loffset, may be modified for non-seekable devices.
RETURN VALUES
The awrite() routine should return 0 for success, or the appropriate error number.
CONTEXT
This function is called from user context only.
EXAMPLES
Example 1: Using the awrite routine:
The following is an example of an awrite() routine:
static int
xxawrite(dev_t dev, struct aio_req *aio, cred_t *cred_p)
{
int instance;
struct xxstate *xsp;
instance = getminor(dev);
xsp = ddi_get_soft_state(statep, instance);
/*Verify soft state structure has been allocated */
if (xsp == NULL)
return (ENXIO);
return (aphysio(xxstrategy, anocancel, dev, B_WRITE, xxminphys, aio));
}
SEE ALSO write(2), aiowrite(3AIO), aread(9E), read(9E), strategy(9E), write(9E), anocancel(9F), aphysio(9F), ddi_get_soft_state(9F), drv_priv(9F),
getminor(9F), minphys(9F), nodev(9F), aio_req(9S), cb_ops(9S), uio(9S)
Writing Device Drivers
BUGS
There is no way other than calling aphysio(9F) to accomplish an asynchronous write.
SunOS 5.10 28 Mar 1997 awrite(9E)