Sponsored Content
Full Discussion: append the position 28:33
Top Forums Shell Programming and Scripting append the position 28:33 Post 302369071 by Scrutinizer on Friday 6th of November 2009 11:00:25 AM
Old 11-06-2009
Code:
sed 's/OLF-AA/OLF-1E/;s/ODL-SP/ODL-2S/;s/ODL-CH/ODL-3C/' infile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Append line based on fixed position

Hi all; I'm having headache on append one line to another based on the fix position.Hope u guys can help. All i need to do is append the line that start with '3' to a line which start with '1' and the position for line 3 that i need to append is 22. The original file look like this: ... (2 Replies)
Discussion started by: ashikin_8119
2 Replies

2. Shell Programming and Scripting

how to find a position and print some string in the next and same position

I need a script for... how to find a position of column data and print some string in the next line and same position position should find based on *HEADER8* in text for ex: ord123 abs 123 987HEADER89 test234 ord124 abc 124 987HEADER88 test235 ... (1 Reply)
Discussion started by: naveenkcl
1 Replies

3. UNIX for Dummies Questions & Answers

find if a position is between a given start and end position

Hi, I am a newbie in unix programming so maybe this is a simple question. I would like to know how can I make a script that outputs only the values that are not between any given start and end positions Example file1: 2 30 40 80 82 100 file2: ID1 1 ID2 35 ID3 80 ID4 81 ID6... (9 Replies)
Discussion started by: fadista
9 Replies

4. Shell Programming and Scripting

append existing file with zeroes bsed on position

Hi i am trying to append value with 0 to an existing file in the position 50-56 & 58-64 only where empty space is there Rule: 1 row already has some value and i do not want to change anything for this row. 2nd record below you see the position 50-64 is empty, i want to replace with 0000000... (3 Replies)
Discussion started by: kshuser
3 Replies

5. Shell Programming and Scripting

append each line on fixed position 31 to 33

I have a .DAT file like below. 26666666660001343 000001004OLF 029100020090820 27777777770000060 000001004ODL-CH001000020090820 28888888880000780 000001013OLF 006500020090820 ....... ........ and so on..... I want to append each line in a file in .KSH script with XXX with position... (5 Replies)
Discussion started by: kshuser
5 Replies

6. Shell Programming and Scripting

Moving first position in a file to the last position

hi, I have a file which consists of some records: 2010_06_4010093_001_001|10|ABCDEFGH|9|4010093||0040400||31.12.2009|S|O|X||||20100602093851-31.12.2009|XXBBFC|EFG||||00001| 2010_06_4010162_001_001|11|ABCDEFGH|9|4010162||0040400||31.12.2009|S|O|X||||20100602093851-31.12.2009|XXBBFC|EFG||||00002|... (11 Replies)
Discussion started by: pparthiv
11 Replies

7. Shell Programming and Scripting

Remove text from n position to n position sed/awk

I want to remove text from nth position to nth position couple of times in same line my line is "hello is there anyone can help me with this question" I need like this ello is there anyone can help me with question 'h' is removed and 'this' removed from the line. I want to do this... (5 Replies)
Discussion started by: elamurugu
5 Replies

8. Shell Programming and Scripting

Need command or script to print all lines from 2nd position to last but one position

hi guys, i want command or script to display the content of file from 2nd position to last but one position of a file abcdefghdasdasdsd 123,345,678,345,323 434,656,656,656,656 678,878,878,989,545 4565656667,65656 i want to display the same above file without first and... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies

9. Shell Programming and Scripting

Search for a string at a particular position and replace with blank based on position

Hi, I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank. As I am new to unix, I am not able to figure out how to do this. Can you please help me to achieve... (9 Replies)
Discussion started by: Pradhikshan
9 Replies

10. Shell Programming and Scripting

Inserting value at a particular position without changing the position of other characters

Hi All, I wanted a sed/awk command to add a value/character on a particular position without disturbing the position of other characters. I have file a.txt OL 10031 Day Black Midi Good Value P01 P07 OL 10031 Day Black Short Good Value P01 P07 I want to get the output as... (2 Replies)
Discussion started by: rahulsk
2 Replies
odl(5)								File Formats Manual							    odl(5)

NAME
odl, ODL - On-demand font loading DESCRIPTION
On-demand font loading (ODL) is a mechanism through which a terminal or a printer can download the relevant bitmap font information for a user-defined character (UDC) at the time this character has to be displayed or printed by the device. A number of Compaq's local language terminals (such as the VT382 series) and printers support ODL for languages like Japanese, Chinese, and Korean, which include user-defined characters. ODL can be implemented either through hardware or software. In the hardware implementation of ODL, the terminal or printer sends a font loading request to the host computer whenever the device encounters a UDC whose font information is not present in the device. The host computer then completes the transaction by sending to the device a font loading sequence that encodes the bitmap shape of the character. This font information stays in the device until the font information buffer is full or the power is switched off. In the software implementation of ODL (SoftODL), the sending of the font loading request from the device is disabled and it is the host computer that keeps track of which font information has been sent to the device. When the host computer encounters a new UDC or an old one whose font information must be flushed because the font information buffer is full, the host computer sends a font loading sequence to the device before sending the UDC character code in the data to be displayed or printed. The SoftODL mechanism is supported only by the Asian tty driver, atty, and the odld daemon through the utx driver (see atty(7), odld(8), and utx(7)).Users run the cedit utility (see cedit(1)) to create and edit user-defined characters in a UDC database. The cgen command is used to create from the UDC database an ODL database that is used by the SoftODL mechanism. The SoftODL mechanism can be tuned by setting the following parameters: The ODL buffer replacement strategy When the font information buffer is full, there are two ways to decide which piece of old font information is to be replaced by information for a UDC whose information is not in the buffer. They are FIFO (First-In-First-Out) and LRU (Least Recently Used). The size of the ODL font cache The size of the font cache determines how much UDC font information can be kept in the device. This value is device-specific. The value 256 is a safe maximum for most devices, although some terminals are capable of storing font information for 700 UDCs. Refer to the stty(1) reference page for information on setting both these parameters and using other flags related to ODL. In general, ODL implemented in the hardware is more accurate in terms of fetching a UDC font only when needed. However, the overhead of sending font loading requests from device to host makes hardware ODL slower than software ODL. SoftODL is faster and more flexible, but it has the following limitations: Some local language devices have to have the hardware On-Demand Loading flag disabled before the devices can be used with the SoftODL mechanism. When a UDC is keyed in for some of the VT382 series of local language terminals, the character is also displayed on the 26th compose line of the terminal screen. This capability depends on having the character's font loaded in the device. When SoftODL is being used and a UDC is entered for the first time into the terminal after power-up, the correct font of that character does not be display on the compose line. Instead, a reversed wide question mark is displayed. However, the UDC will be displayed correctly on other parts of the screen. If SoftODL is enabled for a terminal session and the terminal is accidentally powered off, users must issue the following command immediately after turning on the power: This command flushes the internal tty cache to avoid a mismatch between the font cache of the tty and that of the terminal. When a terminal is connected by a terminal server to several sessions, only one of those sessions should have ODL (software or hardware) enabled. If more than one session has ODL enabled, you may have to issue one of the follow- ing commands to avoid problems: This command flushes the internal tty cache when you return to the terminal session where SoftODL is being used. This command instructs the tty driver to use SoftODL for all the user-defined characters. However, this option also prevents caching and slows the display of UDCs tremendously. When users change session while SoftODL is enabled, their terminals may hang due to an incomplete escape sequence. This condition can be corrected by using the setup menu of the terminal and activating the "Reset Terminal" soft key. Changing the terminal line discipline while SoftODL is active would cause all the SoftODL parameters stored in the tty driver to be reset to their default values. So, SoftODL is automatically deactivated if the line discipline is changed and must be restarted after the change. Users must be careful when setting the odlsize parameter of the stty command. The optimal value for this parameter is the size of the character font cache in the current terminal. Users can set a value less than or equal to the hardware parameter, but must never set a value larger than that. If the stty parameter is larger than the hardware parameter, the SoftODL mechanism cannot operate properly. Care must also be taken in setting the odltype parameter of the stty command. This parameter must be set to the same type as that of the terminal. A mismatch between the tty driver and terminal settings can produce unexpected results. If the ODL database is changed, the change may not be reflected in any SoftODL terminal sessions that were activated prior to the change. For the already active sessions to recognize any new UDC characters in the ODL database, users have to stop and then restart the SoftODL mechanism by through the stty command. This problem also exists for hardware ODL. SEE ALSO
Commands: cedit(1), cgen(1), stty(1), odld(8), utxd(8) Files: atty(7), utx(7) odl(5)
All times are GMT -4. The time now is 03:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy