Sponsored Content
Full Discussion: Adding text into file
Top Forums Shell Programming and Scripting Adding text into file Post 302402632 by giles.cardew on Wednesday 10th of March 2010 08:30:09 AM
Old 03-10-2010
Dude, I owe you a beer.

Thanks very much
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Adding Text To each line of a file

How would I add text to the beginning of each line in a text file in a script right after the file is created from another text file. (4 Replies)
Discussion started by: cubs0729
4 Replies

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

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

4. Shell Programming and Scripting

Adding a delimiter to a text file

Im writing a KSH script to read a simple text file and add a delimiter. Ive written the following script but it runs very slow. I initially used the cut command to substring the input record then switched to this version using awk to substring... both run too slow. Any ideas how to make this more... (2 Replies)
Discussion started by: lock
2 Replies

5. Shell Programming and Scripting

adding text to a file

Hi All I am making a script in which.I have a problem i try to discribe. File1 content need to be append in file 2 but such as if content already exist then dont add. File1 IS Like this myname yourname hername hisname File2 %AddNameHere myname yourname hername hisname (3 Replies)
Discussion started by: aliahsan81
3 Replies

6. Shell Programming and Scripting

Adding Text To Middle Of File

Hi I am trying to write a bash script to add a line of text to the middle of a file. The way I worked it out was to calculate the number of lines and divide by 2. The file I am using is called newfile and it just contains lines of data. The new file I have created I have called midfile and... (7 Replies)
Discussion started by: BundBash
7 Replies

7. Shell Programming and Scripting

[bash help]Adding multiple lines of text into a specific spot into a text file

I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it. For example, Here is a portion of a zone file. IN NS ns1.domain.tld. IN NS ns2.domain.tld. IN ... (2 Replies)
Discussion started by: cdn_humbucker
2 Replies

8. Shell Programming and Scripting

adding a line to a text file

I have a tab delimited text file, id name distance 1 3325167 0.334561754018 2 3290488 0.389444269458 3 3288794 0.392312701782 4 3347602 0.392532202097 5 3295355 0.394394169485 I need to add a line after the header line. The first and third field of... (3 Replies)
Discussion started by: LMHmedchem
3 Replies

9. Shell Programming and Scripting

editing line in text file adding number to value in file

I have a text file that has data like: Data "12345#22" Fred ID 12345 Age 45 Wilma Dino Data "123#22" Tarzan ID 123 Age 33 Jane I need to figure out a way of adding 1,000,000 to the specific lines (always same format) in the file, so it becomes: Data "1012345#22" Fred ID... (16 Replies)
Discussion started by: say170
16 Replies

10. UNIX for Dummies Questions & Answers

About adding users from a text file using bash

hello, I try to add users from a text file with this form: username:groupename:homedir first i extract data which is separated by ":" then i use useradd to add users/groups. but,,, my code doesn't works : #!/bin/bash echo "give me a text file: " read dir # control if... (2 Replies)
Discussion started by: ref012
2 Replies
lart(1M)																  lart(1M)

NAME
lart - Luser Attitude Readjustment Tool - use a lart to adjust lusers' attitudes SYNOPSIS
lart [ -use tool ] [ -bBfFgklp ] <lusername> DESCRIPTION
lart adjusts the attitudes of those pesky, clueless people who rely upon their admins for everything from picking their mice off of the floor to turning on their monitors; namely, the luser(8). Running lart with the appropriate arguments will cause the specified luser to run away screaming in agony. Alternatively, you can make the luser buy you a beer, after killing all of their processes. OPTIONS
-use tool Choose your weapon. If this option is not specified, the enviroment variable LART is used. If neither is set, a default value will be used, which is set at compile time -b Used to increase the size of your lart -B The BOFH option. Removes a users files and kills all their processes. If used in conjunction with -p this will also cause syslog to make entries proving that <lusername> was the second gunman behind the grassy knoll -f Only fake luser's attitude readjustment session. Provided primarily for testing purposes. Mutually exclusive with -B -F fsck <lusername> as a raw device. Note that this option has not been tested, as it is rather difficult to find volunteers -g Graphic violence. Uses curses to monitor <lusername> during the beating. -k Kill. A rather permanent option, and as such is not highly recommended. Can only be invoked once per <lusername> -p See -B SEE ALSO
sysadmin(1), guru(8), luser(8) 01 23 1996 lart(1M)
All times are GMT -4. The time now is 07:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy