Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Erase line of text file one by one Post 302537778 by curleb on Sunday 10th of July 2011 06:31:25 AM
Old 07-10-2011
Use 'perl -i' to effect the change on the file being perused...but have you written the prompting section of the script yet?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

erase file

I have a file that always generated in the system eg. /tmp/log.txt , it is generated by the application program , but this file should not be present in the system otherwise there are some program problem , I want to erase this file once the program has generate it , as I know , it can link to... (2 Replies)
Discussion started by: ust
2 Replies

2. Shell Programming and Scripting

How to erase files with line number less than 100

I am trying to delete all the files with line number less than 100 in a directory. Thank you. (5 Replies)
Discussion started by: Sean2008
5 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

How to insert some constant text at beginig of each line within a text file.

Dear Folks :), I am new to UNIX scripting and I do not know how can I insert some text in the first column of a UNIX text file at command promtp. I can do this in vi editor by using this command :g/^/s//BBB_ e,g I have a file named as Test.dat and it containins below text: michal... (4 Replies)
Discussion started by: Muhammad Afzal
4 Replies

5. Shell Programming and Scripting

Search text from a file and print text and one previous line too

Hi, Please let me know how to find text and print text and its previous line. Please don't get irritated few days back I asked text and next line. I am using HP-UX 11.11 Thanks for your help. (6 Replies)
Discussion started by: kamranjalal
6 Replies

6. Shell Programming and Scripting

get the fifth line of a text file into a shell script and trim the line to extract a WORD

FOLKS , i have a text file that is generated automatically of an another korn shell script, i want to bring in the fifth line of the text file in to my korn shell script and look for a particular word in the line . Can you all share some thoughts on this one. thanks... Venu (3 Replies)
Discussion started by: venu
3 Replies

7. Shell Programming and Scripting

How To Erase a line is a row is empty?

Hi! i've been reading you guys for some time, now there is something I couldn't find here, I'm trying to purge some data for my thesis but my measurements have some gaps in the third columns. The solution is simple, -Erase those lines where the third column is empty ¿How? example... (1 Reply)
Discussion started by: AriasFco
1 Replies

8. Shell Programming and Scripting

How to erase junk Chars coming in only the first line

I have a file containing few thousands of lines. when I do cat on it , i find it having two special Chars at the start of first line alone as shown down here. ÿþHDR|20111024|01 If i delete this line and do a cat on file , the current first line is shown to have the same special Chars. ... (3 Replies)
Discussion started by: subramanian2008
3 Replies

9. UNIX for Dummies Questions & Answers

Extracting lines from a text file based on another text file with line numbers

Hi, I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

10. Shell Programming and Scripting

Reading text file, comparing a value in a line, and placing only part of the line in a variable?

I need some help. I would like to read in a text file. Take a variable such as ROW-D-01, compare it to what's in one line in the text file such as PROD/VM/ROW-D-01 and only input PROD/VM into a variable without the /ROW-D-01. Is this possible? any help is appreciated. (2 Replies)
Discussion started by: xChristopher
2 Replies
UPDATE-BOOTLOADER(1)					User Contributed Perl Documentation				      UPDATE-BOOTLOADER(1)

NAME
update-bootloader - update/change bootloader configuration using Bootloader::Tools perl module SYNOPSIS
update-bootloader [operation] [options] operation is one of --add, --remove or --refresh. valid options are --help, --man, --image <file>, --initrd <file>, --xen-kernel <file>, --xen, --default, --previous, --name <string>, --force, --force-default. DESCRIPTION
update-bootloader will let you modify your bootloader configuration using Bootloader::Tools perl module. OPERATIONS
--add add an new image section. Needs a call to --refresh to take effect. --remove remove the specified image section. Needs a call to --refresh to take effect. --refresh activate the new config e.g. write boot loader to disk PARAMETER
--help Print a brief help message and exits. --man Prints the manual page and exits. --image file specify path to kernel image --initrd file specify path to initrd file --xen specify that you what to add a xen and not a regular image section --xen-kernel file specify that you what to add a xen section with a specific image. Implies --xen option. --default let the new section to be added be the default section if appropriate. Only allowed together with --add operation --previous set some usuable defaults for image, initrd and name when --name string specify the name of the section to be added/removed --force dont complain, just do the right thing --force-default force the new section to be added to be the default section. Only allowed together with --add operation perl v5.12.1 2010-04-22 UPDATE-BOOTLOADER(1)
All times are GMT -4. The time now is 06:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy