Sponsored Content
Top Forums Shell Programming and Scripting replacing specific lines in a file Post 302091154 by hcclnoodles on Friday 29th of September 2006 11:12:43 AM
Old 09-29-2006
that works great thankyou ....I wanted to avoid creating a new file and mv'ing it back over again....but if i have to do that then so be it

thanks for your help
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

replacing first line or lines in a file

hey guys, how do i replace only a line within a file without messing up the rest of the contents of the file? see, if possible can you guys give me a straight forward way to do this. i dont want a complex command. what i mean is i know i can accomplish this by using sed, well, i think i can,... (3 Replies)
Discussion started by: Terrible
3 Replies

2. UNIX for Dummies Questions & Answers

how to display specific lines of a specific file

are there any basic commands that can display lines 99 - 101 of the /etc/passwd file? I'm thinking use of head and tail, but I forget what numbers to use and where to put /etc/passwd in the command. (2 Replies)
Discussion started by: raidkridley
2 Replies

3. Shell Programming and Scripting

Replacing Block of lines in a text file

Dear All, Regards of the Day. I have a text file with some functions: Function1 { parameter 1 parameter 2 parameter 3 } end Function2 { parameter 1 parameter 2 parameter 3 } (1 Reply)
Discussion started by: ashisharora
1 Replies

4. Shell Programming and Scripting

replacing field in specific line in a file

Hi, I know there are lots of threads on replacing text within files, usually using sed or awk. However, I find it hard to adapt examples that I found to my specific case. I am kind of new to UNIX and have hard times learning the syntax either for sed or awk so I would appreciate any help. Here's... (5 Replies)
Discussion started by: vytenis
5 Replies

5. UNIX for Dummies Questions & Answers

Replacing all cells that have a specific value in a text file

I have a space delimited text file where I want to replace all cells that are 0 with NA. However I cannot simply use 'sed/0/NA/g' because there are other 0's in the text file that are part of numbers. Example input: 896.933464285715 0 874.691732142857 866.404660714286 Output:... (1 Reply)
Discussion started by: evelibertine
1 Replies

6. Shell Programming and Scripting

Replacing specific lines with another lines

Hi, I have a file with many lines, then i have following list of lines(line number 5,12,19,5,and 28) i need to replace these lines of a file with another lines as shown below these text contains special charecter like= (/:;){} Line_number Text to replace with 5 abc... (1 Reply)
Discussion started by: MILAN KUMAR
1 Replies

7. Shell Programming and Scripting

Summing over specific lines and replacing the lines with the sum using sed, awk

Hi friends, This is sed & awk type question. I have a text file which has numbers spread all over the file. I want to sum the series of numbers whenever i find it and produce an output file with the sum. For example ###start of input text file #### abc def ghi 1 2 3 4 kjld random... (3 Replies)
Discussion started by: kaaliakahn
3 Replies

8. Shell Programming and Scripting

Summing over specific lines and replacing the lines with the sum

Hi friends, This is sed & awk type question. It is slightly different from my previous question. I have a text file which has numbers spread all over the file. I want to sum the series of numbers (but no more than 10 numbers in series) whenever i find it and produce an output file with the... (4 Replies)
Discussion started by: kaaliakahn
4 Replies

9. UNIX for Dummies Questions & Answers

Quick UNIX command to display specific lines in the middle of a file from/to specific word

This could be a really dummy question. I have a log text file. What unix command to extract line from specific string to another specific string. Is it something similar to?: more +/"string" file_name Thanks (4 Replies)
Discussion started by: aku
4 Replies

10. Shell Programming and Scripting

Matching and Replacing file lines starting with $

Here is the task that I was presented with: I am dealing with about a 10,000 line input deck file for an analysis. About 10 separate blocks of around 25 lines of code each need to be updated in the input deck. The input deck (deckToChange in the code below) comes with 2 separate files. File 1... (5 Replies)
Discussion started by: tiktak292
5 Replies
XkbNoteNameChanges(3)						   XKB FUNCTIONS					     XkbNoteNameChanges(3)

NAME
XkbNoteNameChanges - Note the changed names in a changes structure SYNOPSIS
void XkbNoteNameChanges ( old, new, wanted ) XkbNameChangesPtr old; XkbNamesNotifyEvent * new; unsigned int wanted; ARGUMENTS
- old XkbNameChanges structure to be updated - new event from which changes are to be copied - wanted types of names for which changes are to be noted DESCRIPTION
When your application receives a XkbNamesNotify event, you can note the changed names in a changes structure using XkbNoteNameChanges. The wanted parameter is the bitwise inclusive OR of the valid names mask bits shown in Table 1. XkbNoteNameChanges copies any changes that are reported in new and specified in wanted into the changes record specified by old. Table 1 Symbolic Names Masks --------------------------------------------------------------------------------- Mask Bit Value Keyboard Field Component --------------------------------------------------------------------------------- XkbKeycodesNameMask (1<<0) Xkb->names keycodes XkbGeometryNameMask (1<<1) Xkb->names geometry XkbSymbolsNameMask (1<<2) Xkb->names symbols XkbPhysSymbolsNameMask (1<<3) Xkb->names phys_symbols XkbTypesNameMask (1<<4) Xkb->names type XkbCompatNameMask (1<<5) Xkb->names compat XkbKeyTypeNamesMask (1<<6) Xkb->map type[*].name XkbKTLevelNamesMask (1<<7) Xkb->map type[*].lvl_names[*] XkbIndicatorNamesMask (1<<8) Xkb->names indicators[*] XkbKeyNamesMask (1<<9) Xkb->names keys[*], num_keys XkbKeyAliasesMask (1<<10) Xkb->names key_aliases[*], num_key_aliases XkbVirtualModNamesMask (1<<11) Xkb->names vmods[*] XkbGroupNamesMask (1<<12) Xkb->names groups[*] XkbRGNamesMask (1<<13) Xkb->names radio_groups[*], num_rg XkbComponentNamesMask (0x3f) Xkb->names keycodes, geometry, symbols, physical symbols, types, and compatibility map XkbAllNamesMask (0x3fff) Xkb->names all name components X Version 11 libX11 1.2.1 XkbNoteNameChanges(3)
All times are GMT -4. The time now is 09:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy