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
GIT-GUI(1)							    Git Manual								GIT-GUI(1)

NAME
       git-gui - A portable graphical interface to Git

SYNOPSIS
       git gui [<command>] [arguments]

DESCRIPTION
       A Tcl/Tk based graphical user interface to Git. git gui focuses on allowing users to make changes to their repository by making new
       commits, amending existing ones, creating branches, performing local merges, and fetching/pushing to remote repositories.

       Unlike gitk, git gui focuses on commit generation and single file annotation and does not show project history. It does however supply menu
       actions to start a gitk session from within git gui.

       git gui is known to work on all popular UNIX systems, Mac OS X, and Windows (under both Cygwin and MSYS). To the extent possible OS
       specific user interface guidelines are followed, making git gui a fairly native interface for users.

COMMANDS
       blame
	   Start a blame viewer on the specified file on the given version (or working directory if not specified).

       browser
	   Start a tree browser showing all files in the specified commit (or HEAD by default). Files selected through the browser are opened in
	   the blame viewer.

       citool
	   Start git gui and arrange to make exactly one commit before exiting and returning to the shell. The interface is limited to only commit
	   actions, slightly reducing the application's startup time and simplifying the menubar.

       version
	   Display the currently running version of git gui.

EXAMPLES
       git gui blame Makefile
	   Show the contents of the file Makefile in the current working directory, and provide annotations for both the original author of each
	   line, and who moved the line to its current location. The uncommitted file is annotated, and uncommitted changes (if any) are
	   explicitly attributed to Not Yet Committed.

       git gui blame v0.99.8 Makefile
	   Show the contents of Makefile in revision v0.99.8 and provide annotations for each line. Unlike the above example the file is read from
	   the object database and not the working directory.

       git gui blame --line=100 Makefile
	   Loads annotations as described above and automatically scrolls the view to center on line 100.

       git gui citool
	   Make one commit and return to the shell when it is complete. This command returns a non-zero exit code if the window was closed in any
	   way other than by making a commit.

       git gui citool --amend
	   Automatically enter the Amend Last Commit mode of the interface.

       git gui citool --nocommit
	   Behave as normal citool, but instead of making a commit simply terminate with a zero exit code. It still checks that the index does not
	   contain any unmerged entries, so you can use it as a GUI version of git-mergetool(1)

       git citool
	   Same as git gui citool (above).

       git gui browser maint
	   Show a browser for the tree of the maint branch. Files selected in the browser can be viewed with the internal blame viewer.

SEE ALSO
       gitk(1)
	   The git repository browser. Shows branches, commit history and file differences. gitk is the utility started by git gui's Repository
	   Visualize actions.

OTHER
       git gui is actually maintained as an independent project, but stable versions are distributed as part of the Git suite for the convenience
       of end users.

       A git gui development repository can be obtained from:

	   git clone git://repo.or.cz/git-gui.git

       or

	   git clone http://repo.or.cz/r/git-gui.git

       or browsed online at http://repo.or.cz/w/git-gui.git/.

GIT
       Part of the git(1) suite

Git 1.7.10.4							    11/24/2012								GIT-GUI(1)