Hi Chaps,
I'm trying to print the line number of a comma delimited file where the second field in the line is blank using AWK. Here is the code I have so far where am I going wrong. It is the last column in the file.
nawk -v x==0 'BEGIN {FS=",";OFS=","} x++ if ($2 == " ") print $x' bob.tst
... (3 Replies)
Hi,
I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers.
To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
hi,
i have a file, i need to search for a string , if the line contains i need to print that line number and line ,
please help
thanks in advance
Satya (5 Replies)
Hello,
I am testing some data to get line number at cursor position 9 and found some problem, the code is below.Assume we got 3 attribute. At second attribute, there are some data(eg.A41/A6) missing like at the fourth and six line
11006 A41 1888
11006 ... (7 Replies)
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Hi,
I would like to know how do I print the line # in a script. My requirement is, I have a script which is about ~5000 lines long. If there are any errors happen I just exit. And I would like to add the line # of the script where the error happened.
Thanks, (6 Replies)
I am looking for equivalent of following awk command in perl
# awk '{ print NF ":" $0 } ' junk1
8:VAH NIC_TYPE CONFIG SIZE_GB PILO KOM BHA_GRP DESCR
8:2 NIC6 cont 34 y n shal_orgrp /shal
8:4 NIC5 signa 52 n y shal_orgrp... (3 Replies)
Hello,
I have a question on how to find the line number of the first column that contains specific data. I know how to print all the line numbers of those columns, but haven't been able to figure out how to print only the first one that is found.
For example, if my data has four columns:
115... (3 Replies)
Hi
I want to use awk to match where field 3 contains a number within string - then print the line and just the number as a new field.
The source file is pipe delimited and looks something like
1|net|ABC Letr1|1530|||
1|net|EXP_1040 ABC|1121|||
1|net|EXP_TG1224|1122|||
1|net|R_North|1123|||... (5 Replies)
datafile:
2017-03-24 10:26:22.098566|5|'No Route for Sndr:RETEK RMS 00040 /ZZ Appl:PF Func:PD Txn:832 Group Cntr:None ISA CntlNr:None Ver:003050 '|'2'|'PFI'|'-'|'EAI_ED_DeleteAll'|'EAI_ED'|NULL|NULL|NULL|139050594|ActivityLog|
2017-03-27 02:50:02.028706|5|'No Route for... (7 Replies)
Discussion started by: SkySmart
7 Replies
LEARN ABOUT DEBIAN
vim-registry
vim-registry(5) vim addons vim-registry(5)NAME
vim-registry - syntax for vim-addons registry files
SYNOPSIS
PACKAGE-NAME.yaml
DESCRIPTION
A registry file is a multi-document YAML file (i.e. it can be composed by several different YAML documents separated by "---" lines). Each
YAML document represents a registry entry, that is the information describing a single addon.
Ideally, the registry directory contains one file per package shipping addons; with a filename obeying to the convention PACKAGE-NAME.yaml.
Hence a single package can contribute to the registry with multiple entries described in a single YAML file.
For example, the "vim-scripts" package should ship a single /usr/share/vim/registry/vim-scripts.yaml file, containing one YAML document per
shipped addon. The first lines of such file can look like the following:
addon: alternate
description: "alternate pairing files (e.g. .c/.h) with short ex-commands"
basedir: /usr/share/vim-scripts/
disabledby: "let loaded_alternateFile = 1"
files:
- plugin/a.vim
- doc/alternate.txt
---
addon: whatdomain
description: "query the meaning of a Top Level Domain"
basedir: /usr/share/vim-scripts/
disabledby: "let loaded_whatdomain = 1"
files:
- plugin/whatdomain.vim
---
Each registry entry may contain the following fields, to be typeset according to the YAML specification:
addon (Required)
Name of the addon.
description (Required)
Human understandable textual description of the addon.
files (Required)
List of the files which compose the addon and are required to be present in a component of the Vim runtime path for the addon to be
enabled. Each file is specified relative to a component of the Vim runtime path.
basedir (Optional)
Directory where the files shipped by the addon (i.e., where the symlinks of the user/sysadm should point to) reside on the filesys-
tem. Default is /usr/share/vim/addons.
disabledby (Optional)
Vim script command that can be used (usually by adding it to ~/.vimrc) to prevent the addon from being used even when it is
installed. The intended usage of this field is to "blacklist" an undesired addon whose files are available, and hence automatically
loaded by Vim, in a component of the Vim runtime path.
AUTHOR
James Vega <jamessan@debian.org>
SEE ALSO vim-addons(1), YAML specification <http://www.yaml.org/>
COPYRIGHT
Copyright (C) 2010 James Vega
This program is free software, you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as pub-
lished by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
Debian Project January 2010 vim-registry(5)