Sponsored Content
Full Discussion: How to replace into Vi
Top Forums Shell Programming and Scripting How to replace into Vi Post 302123333 by ravi.sadani19 on Monday 25th of June 2007 07:39:27 AM
Old 06-25-2007
How to replace into Vi

Ravi .
Pawan 19.23
sanjeeva .

I want to replace '.' into 'NULL' not the dot between 19.23 .. only single dots to NULL

how to do replacement after opening file in Vi
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace \n with \r\n

Hi Dudes, I want to replace \n with \r\n through out the file. For this I opened vi editor there tried with " s/\\n/\\r\\n/g ", with this I must be able to satisfy my requirements. But it is searching for the current line (Where cursor is). I need this for entire file. No problem if it is... (3 Replies)
Discussion started by: Chanakya.m
3 Replies

2. UNIX for Dummies Questions & Answers

How to replace ??

Hi all, I have a file with the following data. E01011U, ,E11, , , ,0 E03012U, ,E14, , , ,0 E02013U, ,E25, , , ,0 I want to change it to ('E01-01-1-U','E11' ); ('E03-01-2-U','E14' ); ('E02-01-3-U','E25' ); Please let me know about it .Thanks in advance. (10 Replies)
Discussion started by: preethgideon
10 Replies

3. Shell Programming and Scripting

replace last / by |

Hi: I want to write a Kshell script which will replace last / by |. eg: /home/apps/test/document should be replaced as /home/apps/test|document. The length of the string is not constant. Thanks, Ash (6 Replies)
Discussion started by: naikaa
6 Replies

4. Shell Programming and Scripting

replace

hi i have input file in this format E102|0|1-23-1994|0|12-5-1994|E003|A|10450|charan,devupalli|5000 how to convert this into outfile E102,0,1-23-1994,0,12-5-1994,E003,A,10450,charan,devupalli,5000 i wann the output in excel sheet.........that is why i am converting into csv.. but i have... (6 Replies)
Discussion started by: charandevu
6 Replies

5. Shell Programming and Scripting

Replace Help

Hi, djfksdjk)))) kmmm jfdfjk)))) I want to replace the first ')' after kmmm with #. The output would be djfksdjk)))) exists jfdfjk#))) Can anyone help on this? (3 Replies)
Discussion started by: javeed7
3 Replies

6. Shell Programming and Scripting

awk - replace number of string length from search and replace for a serialized array

Hello, I really would appreciate some help with a bash script for some string manipulation on an SQL dump: I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump. This is quite easy with sed: sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies

7. Shell Programming and Scripting

How to replace

Here is my file content age=12 age=34 age=54 age=23 Hello world. This is the age result I am getting. To day date is 23-02-2010. From the above content I have to replace all the values after 'age=*' to age=24. How to do it. (1 Reply)
Discussion started by: brahma
1 Replies

8. Shell Programming and Scripting

Replace dashes positions 351-357 & 024-043 with 0 & replace " " if exis with 04 at position 381-382

I need to replace dashes (i.e. -) if present from positions 351-357 with zero (i.e. 0), I also need to replace dash (i.e “-“) if present between position 024-043 with zero (i.e. 0) & I replace " " (i.e. 2 space characters) if present at position 381-382 with "04". Total length of record is 413.... (11 Replies)
Discussion started by: lancesunny
11 Replies

9. UNIX for Dummies Questions & Answers

How can I replace the lines that start with a star and replace it with numbers start from 1?

I need to replace the (*) in the fist of a list with numbers using sed for example > this file contain a list * linux * computers * labs * questions to >>>> this file contain a list 1. linux 2. computers 3. labs 4. questions (7 Replies)
Discussion started by: aalbazie
7 Replies

10. UNIX for Beginners Questions & Answers

awk script to extract a column, replace one of the header and replace year(from ddmmyy to yyyy)

I have a csv which has lot of columns . I was looking for an awk script which would extract a column twice. for the first occurance the header and data needs to be intact but for the second occurance i want to replace the header name since it a duplicate and extract year value which is in ddmmyy... (10 Replies)
Discussion started by: Kunalcurious
10 Replies
Writing on the braille display(3)				      BrlAPI					 Writing on the braille display(3)

NAME
Writing on the braille display - Write text to the braille display. Data Structures struct brlapi_writeArguments_t Macros #define BRLAPI_DISPLAY_DEFAULT -1 #define BRLAPI_CURSOR_LEAVE -1 #define BRLAPI_CURSOR_OFF 0 #define BRLAPI_WRITEARGUMENTS_INITIALIZER { BRLAPI_DISPLAY_DEFAULT, 0, 0, NULL, -1, NULL, NULL, BRLAPI_CURSOR_LEAVE, NULL } Functions int BRLAPI_STDCALL brlapi_writeText (int cursor, const char *text) int BRLAPI_STDCALL brlapi__writeText (brlapi_handle_t *handle, int cursor, const char *text) int BRLAPI_STDCALL brlapi_writeDots (const unsigned char *dots) int BRLAPI_STDCALL brlapi__writeDots (brlapi_handle_t *handle, const unsigned char *dots) int BRLAPI_STDCALL brlapi_write (const brlapi_writeArguments_t *arguments) int BRLAPI_STDCALL brlapi__write (brlapi_handle_t *handle, const brlapi_writeArguments_t *arguments) Detailed Description After brlapi_enterTtyMode() has been called, the application can call one of these functions to write things on the braille display. Note: Be sure to call brlapi_enterTtyMode() before calling brlapi_write(), or else you'll get an error. This is particularly not always trivial when writing multithreaded applications. Dots are coded as described in ISO/TR 11548-1: a dot pattern is coded by a byte in which bit 0 is set iff dot 1 is up, bit 1 is set iff dot 2 is up, ... bit 7 is set iff dot 8 is up. This also corresponds to the low-order byte of the coding of unicode's braille row U+2800. Text is translated by the server one to one, by just using a simple wchar_t to pattern table, i.e. no contraction/expansion is performed, because the client would then have no way to know how wide the output would be and thus the quantity of text to feed. If contraction/expansion is desired, the client should perform it itself (e.g. thanks to liblouis or gnome-braille) and send the resulting dot patterns. This is actually exactly the same problem as font rendering on a graphical display: for better control, nowadays all font rasterization is performed on the client side, and mere pixmaps are sent to the X server. Macro Definition Documentation #define BRLAPI_CURSOR_LEAVE -1 Do not change the cursor's state or position. See Also: brlapi_writeText() brlapi_write() brlapi_writeArguments_t #define BRLAPI_CURSOR_OFF 0 Do not display the cursor. See Also: brlapi_writeText() brlapi_write() brlapi_writeArguments_t #define BRLAPI_DISPLAY_DEFAULT -1 Write to the default display on the braille device. See Also: brlapi_write() brlapi_writeArguments_t #define BRLAPI_WRITEARGUMENTS_INITIALIZER { BRLAPI_DISPLAY_DEFAULT, 0, 0, NULL, -1, NULL, NULL, BRLAPI_CURSOR_LEAVE, NULL } Allows to initialize a structure of type brlapi_writeArguments_t * with default values: displayNumber = BRLAPI_DISPLAY_DEFAULT; (unspecified) regionBegin = regionSize = 0; (update the whole display, DEPRECATED and will be forbidden in next release. You must always express the region you wish to update) text = andMask = orMask = NULL; (no text, no attribute) cursor = BRLAPI_CURSOR_LEAVE; (don't touch cursor) Function Documentation int BRLAPI_STDCALL brlapi__write (brlapi_handle_t *handle, const brlapi_writeArguments_t *arguments) int BRLAPI_STDCALL brlapi__writeDots (brlapi_handle_t *handle, const unsigned char *dots) int BRLAPI_STDCALL brlapi__writeText (brlapi_handle_t *handle, intcursor, const char *text) int BRLAPI_STDCALL brlapi_write (const brlapi_writeArguments_t *arguments) Update a specific region of the braille display and apply and/or masks Parameters: arguments gives information necessary for the update regionBegin and regionSize must be filled for specifying which part of the display will be updated, as well as the size (in characters, not bytes) of the text, andMask and orMask members. If given, the 'text' field holds the text that will be displayed in the region. The char string must hold exactly as many characters as the region fields express. For multibyte text, this is the number of multibyte caracters. Notably, combining and double-width caracters count for 1. The actual length of the text in bytes may be specified thanks to textSize. If -1 is given, it will be computed thanks to strlen(), so 'text' must then be a NUL-terminated string. The 'andMask' and 'orMask' masks, if present, are then applied on top of the text, one byte per character. This hence permits the superimposing of attributes over the text. For instance, setting an andMask mask full of BRLAPI_DOTS(1,1,1,1,1,1,0,0) will only keep (logical AND) dots 1-6, hence dropping dots 7 and 8. On the contrary, setting an orMask full of BRLAPI_DOT7|BRLAPI_DOT8 will add (logical OR) dots 7 and 8. The 'charset' field, if present, specifies the charset of the 'text' field. If it is '', the current locale's charset (if any) is assumed. Else, the 8-bit charset of the server is assumed. A special invocation is with an unmodified initialized structure: this clears the client's whole display, letting the display of other applications on the same tty or of applications 'under' the tty appear. See Concurrency management section of the BrlAPI documentation for more details. Returns: 0 on success, -1 on error. int BRLAPI_STDCALL brlapi_writeDots (const unsigned char *dots) Write the given dots array to the display Parameters: dots points on an array of dot information, one per character. Its size must hence be the same as what brlapi_getDisplaySize() returns. Returns: 0 on success, -1 on error. int BRLAPI_STDCALL brlapi_writeText (intcursor, const char *text) Write the given -terminated string to the braille display If the string is too long, it is truncated. If it's too short, it is padded with spaces. The text is assumed to be in the current locale charset, or latin1 if locales have not been initialized. To initialize locales, use setlocale(3). Parameters: cursor gives the cursor position; if equal to BRLAPI_CURSOR_OFF, no cursor is shown at all; if cursor==BRLAPI_CURSOR_LEAVE, the cursor is left where it is text points to the string to be displayed. Returns: 0 on success, -1 on error. Author Generated automatically by Doxygen for BrlAPI from the source code. Version 1.0 Fri Jun 7 2013 Writing on the braille display(3)
All times are GMT -4. The time now is 03:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy