Anyone is well-versed to use egrep to search a file for a line containing both:
1) AAA
2) $
I am having problem escaping the dollar sign when using egrep in conjunction with satisfying AAA as well.
E.g. Text file
Line 1 AAA
Line 2 $$$
Line 3 AAA BBB $
Line 4 $$$ BBB AA
will return me... (2 Replies)
Hi,
How to replace any character in a file with a newline character using sed ..
Ex:
To replace ',' with newline
Input:
abcd,efgh,ijkl,mnop
Output:
abcd
efgh
ijkl
mnop
Thnx in advance.
Regards,
Sasidhar (5 Replies)
Heeloo all,
A weird problem perhaps. May god save others from this problem.
I want to print each line from a variable.. the example below should make it clear.
smvar="Hello World1
Hello world 2
forgot there I guess"
for eachline in $smvar
echo $eachline
end
Whats for... (3 Replies)
Hello,
Need help substituting a particular word in a file having a single line but no newline character at the end.
I was trying to use sed but it doesn't work probably because there is no newline char at the end of the line.
$ cat hlq_detail
/outputs/alvan23/PDFs/bills
$ cat... (5 Replies)
Greetings!
Can we automate the process of removing a newline char from selected rows in a fixed width file using a shell?
Input is like
abcd1234
xyzd1234
abcd
a1b2c3d4
abcd1234
xyzd1234
xx
abcd1234
Expected output -
abcd1234xyzd1234
abcda1b2c3d4abcd1234xyzd1234
xxabcd1234
... (2 Replies)
I have a file ABC.DAT with 2 columns avaialble
Data format :
XYZ!$#$!120
XXZ!$#$!1000
YYZ!$#$!104
While running the following code :
FILE_COUNTER=1;
RECORD_CN_FILE_COUNT=$((`wc -l ABC.DAT| cut -f1 -d' '`));
while
do
FILE_NAME=`cat ABC.DAT.DAT| head -$FILE_COUNTER |tail -1 | awk -F... (1 Reply)
Hello
I created 3 files by:
dd if=/dev/urandom bs=1024 count=1000000 of=./testfile1
dd if=/dev/urandom bs=1024 count=5000000 of=./testfile2
dd if=/dev/urandom bs=1024 count=10000000 of=./testfile3
Now I want to know how to make a change in a specific byte and/or line of theses files? (2 Replies)
Hi,
First find the special character, from the special character take next two bytes convert the bytes to decimal and replace with next present byte of decimal value times.
E.g.
Input: 302619ú1A?
Output: 302619(3 spaces for ú1A)??????????????????????????
Thanks,
Dines (27 Replies)
I have a pipe delimited file and I'm trying to write a script that will give the character/byte positions of each pipe in the file. There may be some simple way but I don't know what it is... Can someone help with this?
Ex: file has output below
abc|def|ghi|
I want the script to tell the... (1 Reply)
Discussion started by: basz808
1 Replies
LEARN ABOUT ULTRIX
xstorebuffer
XStoreBytes(3X11) MIT X11R4 XStoreBytes(3X11)Name
XStoreBytes, XStoreBuffer, XFetchBytes, XFetchBuffer, XRotateBuffers - manipulate cut and paste buffers
Syntax
XStoreBytes(display, bytes, nbytes)
Display *display;
char *bytes;
int nbytes;
XStoreBuffer(display, bytes, nbytes, buffer)
Display *display;
char *bytes;
int nbytes;
int buffer;
char *XFetchBytes(display, nbytes_return)
Display *display;
int *nbytes_return;
char *XFetchBuffer(display, nbytes_return, buffer)
Display *display;
int *nbytes_return;
int buffer;
XRotateBuffers(display, rotate)
Display *display;
int rotate;
Arguments
buffer Specifies the buffer in which you want to store the bytes or from which you want the stored data returned.
bytes Specifies the bytes, which are not necessarily ASCII or null-terminated.
display Specifies the connection to the X server.
nbytes Specifies the number of bytes to be stored.
nbytes_return
Returns the number of bytes in the buffer.
rotate Specifies how much to rotate the cut buffers.
Description
Note that the cut buffer's contents need not be text, so zero bytes are not special. The cut buffer's contents can be retrieved later by
any client calling
can generate a error.
If the property for the buffer has never been created, a error results.
can generate and errors.
The function returns the number of bytes in the nbytes_return argument, if the buffer contains data. Otherwise, the function returns NULL
and sets nbytes to 0. The appropriate amount of storage is allocated and the pointer returned. The client must free this storage when
finished with it by calling Note that the cut buffer does not necessarily contain text, so it may contain embedded zero bytes and may not
terminate with a null byte.
The function returns zero to the nbytes_return argument if there is no data in the buffer.
can generate a error.
The function rotates the cut buffers, such that buffer 0 becomes buffer n, buffer 1 becomes n + 1 mod 8, and so on. This cut buffer num-
bering is global to the display. Note that generates errors if any of the eight buffers have not been created.
can generate a error.
Diagnostics
The server failed to allocate the requested resource or server memory.
A value for an Atom argument does not name a defined Atom.
Some argument or pair of arguments has the correct type and range but fails
to match in some other way required by the request.
Some numeric value falls outside the range of values accepted by the request.
Unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument
defined as a set of alternatives can generate this error.
See AlsoXFree(3X11)
X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys
XStoreBytes(3X11)