I need help in manipulating the data in first column in a file.
The sample data looks like below,
1] All field in the file are separated by ","
2] File is having weekly data extracted from database
3] For eg. Consider week from Jul 18 2011 To Jul 24 2011
Here I would like to search for date pattern as "Jul 18", "Jul 19","Jul 20" so on & replace it with "Jul 18 2011" type pattern.
Plzzzz, tell me some script about this...
What does this mean ?
sed '/^ */s///'
sed '/^/s// /'
and why it's diferent ???
sed '/ */s// /g' and sed 's/ */ /g'. It's all the same ???
Thanks you very much (2 Replies)
$ cat log.txt
Name Age Sex Lcation nfld alias xsd
CC 25 M XYZ asx KK Y
BB 21 F XAS awe SS N
SD 21 M AQW rty SD A
How can I replace the column with header "Lcation" with the column with header "alias" and delete the "alias" column?
so that the final output will become:
Name Age Sex... (10 Replies)
Hi, i read couple of threads here on forum, and googled about what bugs me, yet i still can't find solution.
Problem is below.
I need to change this string (with sed if it is possible):
This is message text that is being quoted
to look like this:
This is message text that is being quotedI... (2 Replies)
Need help with either sed or awk to acheive the following
file1
-----
In the amazon forest
The bats eat all the time...
mon tue wed they would eat berries
In the tropical forest
The bats eat all the time...
on wed bats eat nuts
In the rain forest
The bats eat all the time...
on... (2 Replies)
Hi,
Kindly need your expertise in this problem.
I have to search and replace data. The problem is, the data is in the same format but slightly different content. What I need is sed commands that can work for those "slightly different content".
input: ... (3 Replies)
Hi,I have 2 files master.txt & reference.txt as shown below & i require o/p as mentioned in file 3 using awk but content is not replacing properlymaster.txt:... (15 Replies)
I need to be able to search for a string in the first column and if that string exists than replace the nth column with "-9.99".
AW12000012012 2.38 1.51 3.01 1.66 0.90 0.91 1.22 0.82 0.57 1.67 2.31 3.63 0.00
AW12000012013 1.52 0.90 1.20 1.34 1.21 0.67 ... (14 Replies)
how to search and replace string in column in file with command sed or other
search "INC0000003.in" and replace column 4 = "W"
$ cat file.txt
INC0000001.in|20150120|Y|N|N
INC0000002.in|20150120|Y|N|N
INC0000003.in|20150120|Y|N|N
INC0000004.in|20150120|Y|N|Noutput... (4 Replies)
I am passing a variable and replace nth value with the variable.
I tried using many options in awk command but unable to ignore the special characters in the output and also unable to pass the actual value.
Input : "1","2","3"
Output : "1","1000","3"
TempVal=`echo 1000`
Cat... (2 Replies)
Discussion started by: onesuri
2 Replies
LEARN ABOUT DEBIAN
makepattern
MAKEPATTERN(1gmt) Generic Mapping Tools MAKEPATTERN(1gmt)NAME
makepattern - make GMT color pattern from b/w pattern or icon
SYNOPSIS
makepattern 1bit.ras | iconfile -Cfr/g/b -Cbr/g/b
DESCRIPTION
makepattern reads either a Sun 1-bit rasterfile OR a Sun icon file. It then accepts color choices for the foreground and background pixels
and colorizes the pattern, writing it as a 8-bit Sun rasterfile on stdout. These patterns may then be used in GMT (3.1 or later) -Gp set-
tings or by psimage.
1bit.ras | iconfile
Either a 1-bit Sun rasterfile (standard format, no RLE) or a Sun icon file (as used in GMT 3.0).
-Cf Sets the color for the foreground pixels (the ones) [black].
-Cb Sets the color for the background pixels (the zeros) [white].
WIN32 fix
Since binary redirection under WIN32 does not work, you must specify the output file with -Gnewfile.ras. This option is only available
under WIN32.
EXAMPLES
To create a colorized red/blue 8-bit Sun rasterfile pattern from the old 3.0-style iconpattern stored in file custom.icon, run
makepattern custom.icon -Cfred -Cbblue > custom.ras
To create a green/blue 8-bit Sun rasterfile pattern from a 1-bit Sun raster called bits.ras, run
makepattern bits.ras -Cfgreen -Cbblue > colorbits.ras
SEE ALSO GMT(1), psimage(1)GMT 4.5.7 15 Jul 2011 MAKEPATTERN(1gmt)