Sponsored Content
Full Discussion: Remove prefix using awk
Top Forums Shell Programming and Scripting Remove prefix using awk Post 302321644 by ghostdog74 on Monday 1st of June 2009 07:59:58 PM
Old 06-01-2009
check the syntax of your gsub().
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

remove filename prefix

I've got a bunch of files called oldabc, olddef etc. i want to copy these to be abc, def.... I can do this with file extensions....but can get the logic to work for prefixes. All the files I am interested in have a prefix of 'old'. This loop is no good for me....it looks at the content... (2 Replies)
Discussion started by: peter.herlihy
2 Replies

2. Shell Programming and Scripting

Remove prefix from filenames

I'm trying to put together a shell script that will append specific prefixes based on the content of filenames. I think I have this part down. However, I want to append before that part a process that will remove the current prefix before it renames the files with the new prefix. For example,... (6 Replies)
Discussion started by: HLee1981
6 Replies

3. Shell Programming and Scripting

Need awk script to add a prefix to each line in file

Hello , I have file with below content : '165567885', '165568443', '165568805', I need an awk script that would add a prefix zero after first ' . Like '0165567885', '0165568443', '0165568805', Please help. Thanks in advance. (5 Replies)
Discussion started by: rmv
5 Replies

4. Shell Programming and Scripting

Remove prefix per line in file

Hi, I'm using a .ksh script to split one file into multible files by checking for the prefix per line. It works perfekt (thanks again for anyone involved in helping me with that ;)), but I want to remove the prefix per line too. Means only the line information itself should remain in the... (7 Replies)
Discussion started by: spidermike
7 Replies

5. Linux

Adding a prefix to a column using awk/sed commands

Hello, I am a newbie to linux and struggling to find a better way to append a column in a text file. Here is the file i want to modify: It has 8 columns (and thousands of rows). I want to append the first column by adding "chr" infront of the numbers. Some rows have a string in the first... (4 Replies)
Discussion started by: bjorngill
4 Replies

6. Shell Programming and Scripting

AWK adding prefix/suffix to list of strings

75 103 131 133 138 183 197 221 232 234 248 256 286 342 368 389 463 499 524 538 (5 Replies)
Discussion started by: chrisjorg
5 Replies

7. Shell Programming and Scripting

awk to remove last two -*-*

fq-bar-something-1.0-r1.src.rpm ----> fq-bar-something fq-bar-xx-r1-rel.src.rpm ---------> fq-bar-xx fq-bar-ff-ver-11-rel.src.rpm -------> fq-bar-ff-ver any help? (5 Replies)
Discussion started by: yanglei_fage
5 Replies

8. Shell Programming and Scripting

Extract Uniq prefix from a start and end prefix

Dear All, assume i have a file with content: <Start>6000</Start> <Stop>7599</Stop> the output is: 6000 7000 7100 7200 7300 7400 7599 how should we use any awk, sed, perl can do this task, means to extract the uniq prefixes from the start and stop prefix. Thanks Jimmy (3 Replies)
Discussion started by: jimmy_y
3 Replies

9. Shell Programming and Scripting

Need to add prefix using sed or awk from cat the file

I need the use sed or AWK using cat the file Node1 TDEV RW 1035788 TDEV RW 1035788 Server1 TDEV RW 69053 Server2 TDEV RW 69053 TDEV RW 103579 Server3 TDEV RW 69053 server4 RDF1+TDEV RW 69053 RDF1+TDEV RW 517894 RDF1+TDEV RW 621473 server6 TDEV RW 34526 TDEV RW 34526 (22 Replies)
Discussion started by: ranjancom2000
22 Replies

10. Shell Programming and Scripting

awk move select fields to match file prefix in two directories

In the awk below I am trying to use the file1 as a match to file2. In file2 the contents of $5,&6,and $7 (always tab-delimited) and are copied to the output under the header Quality metrics. The below executes but the output is empty. I have added comments to help and show my thinking. Thank you... (0 Replies)
Discussion started by: cmccabe
0 Replies
gd2i(Gendarme 2.10.0.0) 												   gd2i(Gendarme 2.10.0.0)

NAME
Gendarme Defect To Ignore List SYNOPSIS
gd2i defects.xml list.ignore [--extra-check] [--syntax-check] [--quiet] [--version] [--help] DESCRIPTION
gd2i is small tool to help you create, or update, an ignore-list baseline from an XML list of defects (generated by Gendarme). OPTIONS
defects.xml The, XML formatted, list of defects produced by Gendarme on your project. list.ignore The, text, file listing ignored defects entries for your project. If the file does not already exists (i.e. an update) then it will be created. See gendarme(5) for the format of this file. --extra-check Report ignore entries, from an existing 'list.ignore' file, that does not match any defect, from the 'defects.xml' file. --syntax-check Report syntax error found when processing an existing 'list.ignore' file. --quiet Used to disable progress and other information which is normally written to stdout. --version Display the tool's version number. This will match the Mono version number that this copy of Gendarme was released with. --help Show help about the command-line options. EXIT STATUS
0 The tool returns 0 when no error has occurred. 1 The tool returns 1 if some command-line parameter were not valid. 2 The tool execution was interrupted by a non-handled exception. This is likely a bug inside the tool and should be reported on Nov- ell's bugzilla (http://bugzilla.novell.com) or on the mailing-list. COPYRIGHT
Copyright (C) 2010 Novell, Inc (http://www.novell.com) MAILING LISTS
Mailing lists are listed at the http://groups.google.com/group/gendarme WEB SITE
http://www.mono-project.com/Gendarme SEE ALSO
gendarme(1),gendarme(5),mono(1) gd2i(Gendarme 2.10.0.0)
All times are GMT -4. The time now is 11:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy