Problem inserting text into file after specific line


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem inserting text into file after specific line
# 1  
Old 03-15-2009
Problem inserting text into file after specific line

this is utterly embarassing Smilie

after posting here i revisited my files and found that when i used "vi" instead of a gui based editor, i suddenly found that the indentations were in fact wrong Smilie

sorry about this Smilie

Last edited by mocca; 03-15-2009 at 07:22 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract specific line in an html file starting and ending with specific pattern to a text file

Hi This is my first post and I'm just a beginner. So please be nice to me. I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file? I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies

2. Shell Programming and Scripting

Commenting a specific line and inserting a new line after commented line.

Hello All, I have following file contents cat file #line=aaaaaa #line=bbbbbb #line=cccccc #line=dddddd line=eeeeee #comment=11111 #comment=22222 #comment=33333 #comment=44444 comment=55555 Testing script Good Luck! I would like to comment line line=eeeeee and insert a new line... (19 Replies)
Discussion started by: manishdivs
19 Replies

3. Shell Programming and Scripting

Inserting file after specific line in another file

Im attempting to insert the contents of File1 at a specific point of File2. File1 AD004 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1 File2 AA001 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1 AB002 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1 AC003 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1 Result AA001 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1... (13 Replies)
Discussion started by: ncwxpanther
13 Replies

4. Shell Programming and Scripting

script for inserting line at specific place in file

I use zentyal for my server admin, which is great but zentyal auto-generates config file on boot and hence overwrites any changes made directly to config files. In order to allow multiple user access to a MS ACCESS database, I need to customise the smb.conf file and add the following line to the... (9 Replies)
Discussion started by: barrydocks
9 Replies

5. Linux

Get a specific line number from a text file

Hello! All, Could you please tell me how to get a specific line number from a text file? For example below, ABC DEF ---> Get this line number, return to an variable GHI My OS is Linux. Thank you so much for your help in advance! (3 Replies)
Discussion started by: barryxian
3 Replies

6. UNIX for Dummies Questions & Answers

Inputting text to a specific line of a file

Hi all, I have a script which uses a basic line to add text into another file e.g. grep -i test * >> test.txt Is there a way I can get the output of the grep to output to a specific line in the text.txt for example output above the line starting "Bottom line..." (6 Replies)
Discussion started by: JayC89
6 Replies

7. Shell Programming and Scripting

Reading data from a specific line in a text file

Hello, I have a problem which is giving me headache for days, can some please help. Please see code and text fiel below. Please see text in red for the problem I am facing # Program gets an input x from user while read line ; do echo... (4 Replies)
Discussion started by: jermaine4ever
4 Replies

8. Shell Programming and Scripting

Modify Specific Line of a Text File

Given a text file, how do you add a line of text after a specific line number? I believe I would want to use "sed" but I am unsure of the syntax. Thank you. Mike (5 Replies)
Discussion started by: msb65
5 Replies

9. Shell Programming and Scripting

Adding specific text and spaces to each line in a text file

Hi, I wanted to add specific text to each row in a text file containing three rows. Example: 0 8 7 6 5 5 7 8 9 0 7 9 7 8 9 0 1 2 And I want to add a 21 at the beginning of the first row, and blank spaces at the beginning of the second two rows. To get this: 21 0 8 7 6 5 5 7 8... (4 Replies)
Discussion started by: hertingm
4 Replies

10. Programming

jumping to a specific line in a text file

hi everybody! i need to read a specific line from a text file using C. can any one suggest how to do it. i m aware abt fread(), fwrite(), fseek()... but using these allows the pointer to be moved 1 character at a time. Is there a way i could jump directly to a line if i know the line number?... (4 Replies)
Discussion started by: mridula
4 Replies
Login or Register to Ask a Question
ZIM(1)								   User Commands							    ZIM(1)

NAME
zim - A Desktop Wiki Editor SYNOPSIS
usage: zim [OPTIONS] [NOTEBOOK [PAGE]] or: zim --server [OPTIONS] [NOTEBOOK] or: zim --export [OPTIONS] NOTEBOOK [PAGE] or: zim --search NOTEBOOK QUERY or: zim --index [OPTIONS] NOTEBOOK or: zim --plugin PLUGIN [ARGUMENTS] or: zim --manual [OPTIONS] [PAGE] or: zim --help DESCRIPTION
Zim is a graphical text editor used to maintain a collection of wiki pages. Each page can contain links to other pages, simple formatting and images. Pages are stored in a folder structure, like in an outliner, and can have attachments. Creating a new page is as easy as link- ing to a nonexistent page. All data is stored in plain text files with wiki formatting. Various plugins provide additional functionality, like a task list manager, an equation editor, a tray icon, and support for version control. Zim can be used to: * Keep an archive of notes * Take notes during meetings or lectures * Organize task lists * Draft blog entries and emails * Do brainstorming OPTIONS
General Options: --gui run the editor (this is the default) --server run the web server --export export to a different format --index build an index for a notebook --plugin call a specific plugin function --manual open the user manual -V, --verbose print information to terminal -D, --debug print debug messages -v, --version print version and exit -h, --help print this text GUI Options: --list show the list with notebooks instead of opening the default notebook --geometry window size and position as WxH+X+Y --fullscreen start in fullscreen mode --no-daemon start a single instance, no daemon Server Options: --port port to use (defaults to 8080) --template name of the template to use --gui run the gui wrapper for the server Export Options: --format format to use (defaults to 'html') --template name of the template to use -o, --output output directory --root-url url to use for the document root --index-page index page name You can use the export option to print a single page to stdout. When exporting a whole notebook you need to provide a directory. Search Options: None Index Options: -o, --output output file Try 'zim --manual' for more help. AUTHOR
Jaap Karssenberg <jaap.karssenberg@gmail.com> SEE ALSO
The full documentation for zim is maintained as a zim notebook. The command zim --manual should give you access to the complete manual. The website for zim can be found at http://www.zim-wiki.org zim 0.56 April 2012 ZIM(1)