Sponsored Content
Top Forums Shell Programming and Scripting Adding new lines to a file + adding suffix to a pattern Post 302428853 by agn on Friday 11th of June 2010 05:09:45 AM
Old 06-11-2010
Try,

Code:
awk '/^name/ { print $0; print "employed\npermanently" } /^stationed/ { print $0"-office\n" }' inputfile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

adding text to a file between lines

Suppose content of my first file: first line second line third line How can i insert text between "first line" & "second Iline" Any help?????/ (7 Replies)
Discussion started by: bishweshwar
7 Replies

2. UNIX for Dummies Questions & Answers

Adding lines and columns to a file

Hi everybody, I've got two simples file1 like: aaa aaa aaa bbb bbb bbb ccc ccc ccc and file2 like: 111 111 111 222 222 222 333 333 333 I need to: 1) add a line say "new line" as the first line of the file 2)add a column from file2 (say column3) to file1; the new column should... (14 Replies)
Discussion started by: zajtat
14 Replies

3. Shell Programming and Scripting

Adding strings to lines in a file

Hi all, I have a positional text file that comes from some source application. Before it is processed by destination application I have to add some header (suffix) to every record(line) in the file. e.g. Actual File ............... AccountDetails AcNO Name Amount 1234 John 26578 5678... (3 Replies)
Discussion started by: sharath160
3 Replies

4. 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

5. UNIX Desktop Questions & Answers

Adding lines to pattern space

Is there any way to add lines to the pattern space of sed? I know a bit about the N flag, but am not able to use it to do what I want which is: read a file n lines at a time. If I find a match I quit else move to the next line. e.g. if I am looking for the following three lines Hello How... (2 Replies)
Discussion started by: jawsnnn
2 Replies

6. UNIX for Dummies Questions & Answers

Adding missing lines in file

Dear all, I have a file with two columns - the first column is increasing every 50, the second column is just count (e.g. 5). However, when count is zero, no line is present. Sample: 1950 7 2000 14 2050 7 2100 13 2150 10 2200 9 2250 7 2300 8 2350 7... (1 Reply)
Discussion started by: TheTransporter
1 Replies

7. UNIX for Dummies Questions & Answers

Adding missing lines in file

Dear all, I have a file with two columns - the first column is increasing every 50, the second column is just count (e.g. 5). However, when count is zero, no line is present. Sample: How can I change the file so as to include lines with zero count? e.g. in the previous file to put... (4 Replies)
Discussion started by: TheTransporter
4 Replies

8. Shell Programming and Scripting

Adding lines at a particular location in a file.

Hi Experts, Let us take a text file,say items.txt having the following data jar bottle gum tube cereal bag I want to add the content of items.txt to another file say #many lines not necessary ingredients #many line not necesary ingredients I want to append the data in... (3 Replies)
Discussion started by: Pradeep_1990
3 Replies

9. Shell Programming and Scripting

Adding lines to a large file

Hello, I have a relatively large text file (25,000K) consisting of records of data. For each record, I need to create a new line based on what is already there. Every record has a block that looks like, M END > <ID> 1 > <SOURCE> KEGG > <SOURCE_ID> C00002 > <NAME> ATP;... (4 Replies)
Discussion started by: LMHmedchem
4 Replies

10. UNIX for Beginners Questions & Answers

Adding to an array in an external file, and adding elements to it.

I have an array in an external file, "array.txt", which contains: char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies
MECAB-CONFIG(1) 					      General Commands Manual						   MECAB-CONFIG(1)

NAME
mecab-config - Get command-line flags for building stuff using Mecab SYNOPSIS
mecab-config [OPTION] ... DESCRIPTION
mecab-config gives information about how Mecab is configured on your system, giving necessary command line options to build your applica- tions. Known values for OPTION are: --cxx print C++ compiler used to compile Mecab --prefix print Mecab prefix --exec-prefix print Mecab executable prefix --libs print library linking information --cflags print preprocessor flags, I_opts, and compiler options --dicdir print path to directory containing dictionaries --libexecdir print path to directory containing helper executables --libs-only-L print linker "-L" flags for dynamic linking --libs-only-l print dynamic linker "-l" flags --inc-dir print "-I" include options --help print this help and exit --version print version information SEE ALSO
mecab(1). AUTHOR
This manual page was written by TSUCHIYA Masatoshi <tsuchiya@namazu.org>, for the Debian project (but may be used by others). Aug 15th, 2003 MECAB-CONFIG(1)
All times are GMT -4. The time now is 09:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy