Sponsored Content
Top Forums Shell Programming and Scripting print line if 2nd field exists in text Post 302319903 by jim mcnamara on Tuesday 26th of May 2009 12:36:34 PM
Old 05-26-2009
Please post a few lines from each file.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to print the lines after 2nd line from text file

Hi All, I need to print the lines after 2nd line irrespective of the number of lines in file if the file contents are like below ---------- root:!:0:0::/root:/usr/bin/ksh daemon:!:1:1::/etc: bin:!:2:2::/bin: sys:!:3:3::/usr/sys: adm:!:4:4::/var/adm: uucp:!:5:5::/usr/lib/uucp:... (6 Replies)
Discussion started by: ram1729
6 Replies

2. Shell Programming and Scripting

how to print field n of line m

Hi everyone, I have a basic csh/awk question. How do I print a given field from a given line in a given file? Thanks in advance! (11 Replies)
Discussion started by: Deanne
11 Replies

3. Shell Programming and Scripting

How to print line if field matches?

Hi all, I got several lines line this a b c d e 1 e a 1 c d e 3 f a b c 1 e 8 h a b c d e 1 w a 1 c d e 2 w a b c d e 1 t a b c d e 7 4 How can I print the line if 1 is the field one before the last field? Basicly this 2 field ? a b c d e 1 e a b c d e 1 t The file I got is... (7 Replies)
Discussion started by: stinkefisch
7 Replies

4. Shell Programming and Scripting

only print line if 3rd field is 01

Similar question... I have a space delimited text file and I want to only print the lines where the 3rd word/field/column is equal to "01" awk '{if $3 = "01" print $0}' something like this. I meant to say: only print line IF 3rd field is 01 (2 Replies)
Discussion started by: ajp7701
2 Replies

5. Shell Programming and Scripting

Print a field from the previous line

plz help me!! I have this file , 3408 5600 3796 6035 4200 6285 4676 0 40 1554 200 1998 652 2451 864 2728 1200 0 I want it like if $2==0,replace it with field from the previous line+500 say here the o/p would be like 3408 5600 3796 6035 4200 6285... (16 Replies)
Discussion started by: Indra2011
16 Replies

6. Shell Programming and Scripting

print whole line if the 1st field contains...

i want to print lines in a file that the 1st field of each line has a Date shape such: yy/mm/dd or on the other hand contains slash "/" . (1 Reply)
Discussion started by: oreka18
1 Replies

7. Shell Programming and Scripting

awk to compare 2nd and 3rd field and print the differences

need a one liner to compare 2nd and 3rd field and print values that are not matched in 2nd field Input col 2 col 3 1.1.1.1 11.11.11.11 8.8.8.8 0.0.0.0 3.3.3.3 2.2.2.2 7.7.7.7 3.3.3.3 5.5.5.5 1.1.1.1 4.4.4.4 6.6.6.6 9.9.9.9 output 7.7.7.7 ... (12 Replies)
Discussion started by: chidori
12 Replies

8. Shell Programming and Scripting

Use two field separator in the same line and print them

Hi Guys, I have the file --- HOST_NAME,data_coleta,data_carga,CPU_util,CPU_idle,run_queue,memory,MEMORY_SYSTEM,MEMORY_TOTAL,MEMORY_SWAPIN,MEMORY_SWAPOUT,DISK_READ,DISK_WRITE,DISK_IO,NET_IN_PACKET, NET_OUT_PACKET... (4 Replies)
Discussion started by: antoniorajr
4 Replies

9. Shell Programming and Scripting

Command/script to match a field and print the next field of each line in a file.

Hello, I have a text file in the below format: Source Destination State Lag Status CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies

10. Shell Programming and Scripting

awk to print unique text in field

I am trying to use awk to print the unique entries in $2 So in the example below there are 3 lines but 2 of the lines match in $2 so only one is used in the output. File.txt chr17:29667512-29667673 NF1:exon.1;NF1:exon.2;NF1:exon.38;NF1:exon.4;NF1:exon.46;NF1:exon.47 703.807... (5 Replies)
Discussion started by: cmccabe
5 Replies
BLAZE-ADD(1)						    BlazeBlogger Documentation						      BLAZE-ADD(1)

NAME
blaze-add - adds a blog post or a page to the BlazeBlogger repository SYNOPSIS
blaze-add [-pqCPV] [-b directory] [-E editor] [-a author] [-d date] [-t title] [-k keywords] [-T tags] [-u url] [file...] blaze-add -h|-v DESCRIPTION
blaze-add adds a blog post or a page to the BlazeBlogger repository. If a file is supplied, it adds the content of that file, otherwise an external text editor is opened for you. Note that there are several special forms and placeholders that can be used in the text, and that will be replaced with a proper data when the blog is generated. Special Forms <!-- break --> A mark to delimit a blog post synopsis. Placeholders %root% A relative path to the root directory of the blog. %home% A relative path to the index page of the blog. %page[id]% A relative path to a page with the supplied id. %post[id]% A relative path to a blog post with the supplied id. %tag[name]% A relative path to a tag with the supplied name. OPTIONS
-b directory, --blogdir directory Allows you to specify a directory in which the BlazeBlogger repository is placed. The default option is a current working directory. -E editor, --editor editor Allows you to specify an external text editor. When supplied, this option overrides the relevant configuration option. -t title, --title title Allows you to specify the title of a blog post or page. -a author, --author author Allows you to specify the author of a blog post or page. -d date, --date date Allows you to specify the date of publishing of a blog post or page. -k keywords, --keywords keywords Allows you to specify a comma-separated list of keywords attached to a blog post or page. -T tags, --tags tags Allows you to supply a comma-separated list of tags attached to a blog post. -u url, --url url Allows you to specify the url of a blog post or page. Allowed characters are letters, numbers, hyphens, and underscores. -p, --page, --pages Tells blaze-add to add a page or pages. -P, --post, --posts Tells blaze-add to add a blog post or blog posts. This is the default option. -C, --no-processor Disables processing a blog post or page with an external application. For example, if you use Markdown to convert the lightweight markup language to the valid HTML output, this will enable you to write this particular post in plain HTML directly. -q, --quiet Disables displaying of unnecessary messages. -V, --verbose Enables displaying of all messages. This is the default option. -h, --help Displays usage information and exits. -v, --version Displays version information and exits. ENVIRONMENT
EDITOR Unless the core.editor option is set, BlazeBlogger tries to use system-wide settings to decide which editor to use. EXAMPLE USAGE
Write a new blog post in an external text editor: ~]$ blaze-add Add a new blog post from a file: ~]$ blaze-add new_packages.txt Successfully added the post with ID 10. Write a new page in an external text editor: ~]$ blaze-add -p Write a new page in nano: ~]$ blaze-add -p -E nano SEE ALSO
blaze-init(1), blaze-config(1), blaze-edit(1), blaze-remove(1), blaze-make(1) BUGS
To report a bug or to send a patch, please, add a new issue to the bug tracker at <http://code.google.com/p/blazeblogger/issues/>, or visit the discussion group at <http://groups.google.com/group/blazeblogger/>. COPYRIGHT
Copyright (C) 2008-2011 Jaromir Hradilek This program is free software; see the source for copying conditions. It 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. Version 1.2.0 2012-03-05 BLAZE-ADD(1)
All times are GMT -4. The time now is 09:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy