07-19-2007
replacing text in specific location
i have a file that looks like this:
000000112/01/2008 D99999
000000 12/01/2008 D99999
000000 12/01/2008 1D99999
i need to replace the blanks into 1 for column 7,18-19
how can this be achieved using awk?
Thanks.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file which contains lots of text (comment field). I would like to parse through the comment field which can be up to 255 characters long and look for anything that seems to resemble, say, a credit card number or customer account number, etc. and replace the numbers with asteriks (*).
... (9 Replies)
Discussion started by: giannicello
9 Replies
2. Shell Programming and Scripting
Hi ,
i have one file like :
APP101A
APP103B
MSG307A
MSG308B
XADM002A
and so on , and i expect to replace the last character A by B and B by A
the result would be :
APP101B
APP103A
MSG307B
MSG308A
XADM002B
how can i do that ? (3 Replies)
Discussion started by: Nicol
3 Replies
3. Shell Programming and Scripting
Hi ,
I'm so surprised to see my thread closed !
i come here many times and work with some great guys like Perderabo , each time i search for many solutions to write some scripts for my job , at this time i don't see how i can solve this one , so please don't take me as a pupil !
i can test... (16 Replies)
Discussion started by: Nicol
16 Replies
4. Shell Programming and Scripting
Hi,
I have following samp.txt file in unix.
samp.txt
01Roy2D3M000000
02Rad2D3M222222
.
.
.
.
10Mik0A2M343443
Desired Output
01Roy2A3M000000
02Rad2A3M222222
.
. (5 Replies)
Discussion started by: techmoris
5 Replies
5. Shell Programming and Scripting
Hi,
I have many files scattered in all different folders. I want to replace the text within all the files using a single command ( awk, sed...) Is it possible?
example
find all the files in which there is text "memory" and replace it with "branded_memories".
the files can be at the... (2 Replies)
Discussion started by: rudoraj
2 Replies
6. UNIX for Dummies Questions & Answers
I have a text file in the following format:
13412 NA06985 0 0 2 46.6432798439 4 4 4 4
13412 NA06991 NA06993 NA06985 2 48.8478948517 4 4 2 4
13412 NA06993 0 0 1 45.8022601455 4 4 2 4
13401 NA06994 0 0 1 48.780669145 4 4 4 4
13401 NA07000 0 0 2 47.7312017846 2 4 4 4
13402 NA07019... (3 Replies)
Discussion started by: evelibertine
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a text file in the following format:
Code:
13412 NA06985 0 0 2 46.6432798439 4 4 4 4
13412 NA06991 NA06993 NA06985 2 48.8478948517 4 4 2 4
13412 NA06993 0 0 1 45.8022601455 4 4 2 4
13401 NA06994 0 0 1 48.780669145 4 4 4 4
13401 NA07000 0 0 2 47.7312017846 2 4 4 4 ... (2 Replies)
Discussion started by: evelibertine
2 Replies
8. UNIX for Dummies Questions & Answers
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
9. Shell Programming and Scripting
In Perl. ***edited question below***
Hey all, I am teaching myself some simple CSV file manipulation and have become a little stuck. Say I have the following layout in the CSV file:
age,name,locationIs it possible to INSERT data into the CSV into the correct age order. For example, if I had... (1 Reply)
Discussion started by: whyte_rhyno
1 Replies
10. Shell Programming and Scripting
Greetings.
I've got a csv file with data along these lines:
Spumoni's Pizza Place, Placemats n Things, Just Lamps
Counterfeit Dollars by Vinnie, Just Shades, Dollar StoreI want to replace the entire comma-delimited field if it matches something ending in "Place" or beginning with "Dollar",... (2 Replies)
Discussion started by: palmfrond
2 Replies
LEARN ABOUT DEBIAN
wml::std::box
wml::std::box(3) EN Tools wml::std::box(3)
NAME
wml::std::box - Easily Create Rectangular Box
SYNOPSIS
#use wml::std::box
<box [attributes]>
...
</box>
DESCRIPTION
The "<box>" container tag puts its body into a nice rectangular box which itself is build via a HTML "<table>" construct.
ATTRIBUTES
"header"
This attribute switches between two totally different box variants. When it is present, a headlined box is created by the use of one
single table but with space GIFs. When this attribute is missing a standard box is created by the use of two nested tables but without
any space GIFs.
"bgcolor"
This sets the background color of the box.
"fgcolor"
This sets the foreground (text) color of the box.
"bdcolor"
This sets the color for the border of the box. The effect of this attribute is the automatic generation of a nested table construct to
achieve the optical effect.
"bdspace"
This sets the space between the border and the body of the box in pixels. Default is 4 pixel.
"bdwidth"
This sets the border width in pixels. Default is 1 pixel.
"width"
This sets the total table width in pixels. Default is no specific width for the standard box and 300 pixels for the headlined box
(because the headlined variant needs to know a fixed size to create the GIFs accordingly).
"summary"
Add a description of this table. This attribute is recommended in HTML 4.0.
EXAMPLE
<box bdcolor="#000000" bdwidth=1 bdspace=10
bgcolor="#ffffff" fgcolor="#000000">
Foo Bar Quux
</box>
<box header="Foo Bar Quux Header"
bdcolor="#000000" bdwidth=1 bdspace=10
bgcolor="#ffffff" fgcolor="#000000">
Foo Bar Quux
</box>
AUTHOR
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
REQUIRES
Internal: P1, P2
SEE ALSO
HTML "<table>" tag.
EN Tools 2014-04-16 wml::std::box(3)