using sed to replace a specific string on a specific line number using variables
this is where i am at
grep -v WARNING output | grep -v spawn | grep -v Passphrase | grep -v Authentication | grep -v '/sbin/tfadmin netguard -C'| grep -v 'NETWORK>' >> output.clean
grep -n Destination... (2 Replies)
Hi All,
If anybody could help me with my scenario here. I have a statement file. Example of some content:
DATE DESC Debit Credit Total Rate
02-Jan-08 Lodgement 200.00 1200.00 2.51
14-Sep-07 Withdrawal 50.00 1000.00 ... (8 Replies)
which one of the following is the correct expression to ignore line with multiple spaces after any string
cat file | grep -v "xyz *$"
or
cat file | grep -v "xyz*$"
do i need "*" to specify the sapce or " *" will do? (2 Replies)
Hi,
I have a requirement to remove certain spaces from a table of information, but I'm unsure where to start.
A typical table will be like this:
ABCDE 1 Elton John 25 12 15 9 3
ABCDE 2 Oasis 29 13 4 6 9
ABCDE 3 The Rolling Stones 55 19 3 8 6The goal is to remove only the spaces between... (11 Replies)
Here is a weird question :)
i am trying to create a script written in bash that will create configuration files for nagios. As some of you aware is has to be written in the below format:
define service{
option1 value1
option2 value2... (6 Replies)
Hello All,
I have a comma separated file which needs to be loaded to the database. But, I need to trim the white spaces for a specific column before its loaded.
Below is the sample line from the input file:
690,690,0575,"01011940","01011940", , , , , ,36720,36722,V2020,V2999,... (6 Replies)
Hi,
How to print the number of fields in each record with the line number?
Lets saw I have
3212|shipped|received|
3213|shipped|undelivered|
3214|shipped|received|delivered
I tried the code
awk -F '|' '{print NF}'
This gives me ouput as
3
3
4 (5 Replies)
Hi consider the source file
R|field1|field2
using the print statement in awk prints it as
R field1 field2
Is there an easier way to print the whole line in its original format (i.e. with | delimiters) than doing print $1"|"$2"|"$3 ??
Thanks
Storms (1 Reply)
Hi
I have a file which is tab-delimited. Now, I'd like to print the lines which have "chr6" string in both first and second columns. Could anybody help? (3 Replies)
i'm looking for a command that allows me to print a specific number of spaces which i will provide.
something as simple as:
spaces=4
printf " " * $spaces
i'm looking for somethign that'll allow me to print a specific amount of spaces on a line.
can awk be used for this? (4 Replies)
Discussion started by: SkySmart
4 Replies
LEARN ABOUT DEBIAN
lltag_formats
lltag_formats(5) File Formats Manual lltag_formats(5)NAME
formats - Internal formats database file for lltag
DESCRIPTION
The internal format database is usually stored in /etc/lltag/formats. The user may override this file by defining a $HOME/.lltag/formats.
If this file exists, the system-wide one is ignored.
These files contain entries starting with a line such as:
[%n - %a - %t]
A title between bracket that will be displayed at runtime.
Then, the following 3 lines must be given to explain how the format is actually used to parse filenames:
type = basename
The type is either basename (to parse the last part of the path to a file) or path (to parse the directory part of the path to a
file). When actually parsing the path to target files, basename and path parsers will be assembled. All possible combination will
be tried.
regexp = %L%N%S-%S%A%S-%S%A%L
A string composed of any characters, with the following special fields:
%L for delimiter (empty by default, multiple spaces if --spaces was given)
%S for a space (or multiple spaces if --spaces was given)
%N for numbers
%A for an alphanumeric string without /
%P for any path (alphanumeric string with /)
%% for %
indices = NUMBER,ARTIST,TITLE
A list of fields to match (either given by their full name or associated letter) corresponding to each %N or %A field in the previ-
ous format. It may be AUTHOR (or a), ALBUM (A), GENRE (g), NUMBER (n), TITLE (t), DATE (d), COMMENT (c) or IGNORE (i). See also
FORMAT in the manpage of lltag for details about these fields.
SEE ALSO lltag(1)AUTHOR
Brice Goglin
NOVEMBER 2006 lltag_formats(5)