04-02-2010
How to remove a string from a specific column in a file
Hello,
A basic query. How can I remove a string from a specific column.
For example, remove "abcd" just from column 2 in example file:
abcd abcd1
abcd abcd2
abcd abcd3
to get output:
abcd 1
abcd 2
abcd 3
Thank you!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am looking for a way to remove any line in a text file that contains the string "Mac address". I guess you would grep and sed, but I am not sure how to do this. Thanks for you help. (3 Replies)
Discussion started by: CBarraford
3 Replies
2. UNIX for Dummies Questions & Answers
If I have a data test.txt with 1000 columns such as:
id sex gene1 gene2 gene2.dl gene3 gene4 gene4.dl .......
1 1 AA AT AT TT AT AT .......
2 1 AG TT TT TA AA AA .......
3 2 AA AT AT TT AT ... (2 Replies)
Discussion started by: AMBER
2 Replies
3. Shell Programming and Scripting
I have 5 column in sample txt file
where in i have to create report based upon 1,3 and 5 th column..
I have : in first and third coulmn. But I want to retain the colon of fifth coulmn and remove the colon of first column..
5th column contains String message (for example,... (7 Replies)
Discussion started by: Shirisha
7 Replies
4. Shell Programming and Scripting
Hello ,
i have a text file like this :
A123 c12AB c32DD aaaa
B123 23DS 12QW bbbb
C123 2GR 3RG cccccc
i want to remove the numbers from second and third column only.
i tried this :
perl -pe 's///g' file.txt > newfile.txt
but it will remove the number from... (7 Replies)
Discussion started by: shelladdict
7 Replies
5. Shell Programming and Scripting
Hi,
I need help to remove tab delimited space in the $2 of a specific row. My file is like this:-
file1.txt
No_1 4 139 156
No_1 5 161 205
No_4 91 227 212
No_19 254 243 263
No_19 645 249 258
No_19 101 2492 2635
No_90 8 277 288... (5 Replies)
Discussion started by: redse171
5 Replies
6. Shell Programming and Scripting
Hi,
I would like to ask your expertise to remove specific column no. 8 in the below file using but I don't have an idea on how to simply do this using awk command. Appreciate your help in advance.
Input f:
ABC 1 1XC
CDA 1 2YC
CCC 1 3XC
AVD 1 3XA
Expected output file:
ABC 1 1C
CDA... (9 Replies)
Discussion started by: zzavilz
9 Replies
7. Shell Programming and Scripting
Hi All, I will need an help with respect to replacing a range of columns on a non-delimited file using a particular string pattern.
Say file input is
MYNUMBERD000000-BAN CHUE INSNTS ** N+
MYAREDSDD000000+BAN CHUE INSNTS ** N+
MYDERFFFSD00000-GIR PENT - ACH ** ... (5 Replies)
Discussion started by: navojit dutta
5 Replies
8. Shell Programming and Scripting
I have an xml file dumped from rrd file, that I want to "patch" so the xml file doesn't contain any blank hole in the resulting graph of the rrd file.
Here is the file.
<!-- 2015-10-12 14:00:00 WIB / 1444633200 --> <row><v> 4.0419731265e+07 </v><v> 4.5045912770e+06... (2 Replies)
Discussion started by: rk4k
2 Replies
9. Shell Programming and Scripting
Dear group,
I have following input text file:
Brit 2016 11 18 12 00 10 1.485,00 EUR
Brit 2016 11 18 12 00 10 142,64 EUR
Brit 2016 11 18 12 00 10 19,80 EUR
Brit 2016 11 18 12 00 10 545,00 EUR
Brit 2016 11 18 12 00 10 6.450,00 EUR... (3 Replies)
Discussion started by: gfhsd
3 Replies
10. Shell Programming and Scripting
I need to remove specific column to one range
source file
3 1 000123456
2 2 000123569
3 3 000123564
12 000123156
15 000125648
128 000125648
Output required
3 000123456
2 000123569
3 000123564
12 000123156
15 000125648
128 000125648 (6 Replies)
Discussion started by: ranjancom2000
6 Replies
LEARN ABOUT DEBIAN
tex2xindy
tex2xindy(1) xindy tex2xindy(1)
NAME
tex2xindy - a preprocessor of the xindy index processor
SYNOPSIS
tex2xindy [-o] [attr_file]
DESCRIPTION
tex2xindy transforms a LaTeX index file ".idx" (or an ".aux" file) into a xindy raw index file.
It is a filter that reads from stdin a file in the input format of LaTeX's raw index file, i.e., with "indexentry" tags. It outputs on
stdout a xindy raw index file, i.e., with "indexentry" clauses.
If the option -o is not specified, tex2xindy handles ^^-notation of TeX and outputs the octet that is represented: "^^ab" in the input gets
output as the octet 0xab. If "^^^^abcd" or "^^^^^^^^abcdefab" are detected, they are output as is.
If the option -o is specified, tex2xindy operates in Omega mode and handles its ^^-notation: Then "^^ab", "^^^^abcd", and
"^^^^^^^^abcdefab" represent Unicode characters with code points 0xab, 0xabcd, and 0xabcdefab respectively. They are output in UTF-8
encoding.
If the optional argument attr_file is specified, tex2xindy writes all index key attributes into this file.
DEFICITS
This program was written since it was not easily possible to extract the parser from the old makeindex system. Therefore it does not find
all errors in the input as the makeindex(1) version.
Additionally it uses only the default input specifiers of makeindex(1). If other input specifiers (cf. manual page of makeindex(1)) are
needed, the input specifiers (starting from the pattern "KEYWORD", see below) must be changed and the program must be recompiled.
The particular missing feature is configuration of the quote and the actual characters, maybe also the escape, subitem (level), and encap
characters. Argument and range delimiters seem to be less of a problem.
In fact, input markup handling (and thus tex2xindy) should be incorporated into the xindy kernel, to be able to specify configuration in
xindy style files.
SEE ALSO
texindy(1), xindy(1), makeindex(1)
AUTHOR
Roger Kehr, Institut fuer Theoretische Informatik, TU Darmstadt
COPYRIGHT AND LICENSE
Copyright (c) 1996,1997 Roger Kehr. Copyright (c) 2006 Joachim Schrod.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation,
Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Version 1.24 2010-05-10 tex2xindy(1)