I have to a add 2 lines to /etc/sudoers file under this section below, can someone please suggest script to add these two lines when execute this remotely on to a multiple servers.
Hi, I am n00b to shell scripting and I am learning Ksh, sed and awk. I have a requirement and need your help.
1) How to read a specific section of a file. I have a file and I want to read the contents between say "Page Number:1" to "End of Page 1"
2) Within the section of the file that was... (2 Replies)
are there any basic commands that can display lines 99 - 101 of the /etc/passwd file?
I'm thinking use of head and tail, but I forget what numbers to use and where to put /etc/passwd in the command. (2 Replies)
Hello,
I need help in putting duplicate lines within a section into another file. Here is what I'm struggling with:
Using this file data.txt:
ABC1 012345 header
ABC2 7890-000
ABC3 012345 Header Table
ABC4
ABC5 593.0000 587.4800
ABC5 593.5000 587.6580 <= dup need to remove
ABC5... (4 Replies)
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)
I need some help with adding lines to file and substitute a pattern.
Ok I have a file:
#cat names.txt
name: John Doe
stationed: 1
name: Michael Sweets
stationed: 41
.
.
.
And would like to change it to:
name: John Doe
employed
permanently
stationed: 1-office (7 Replies)
I have a list of Servers in no particular order as follows:
virtualMachines="IIBSBS IIBVICDMS01 IIBVICMA01"And I am generating some output from a pre-existing script that gives me the following (this is a sample output selection).
9/17/2010 8:00:05 PM: Normal backup using VDRBACKUPS... (2 Replies)
I have a space delimited text file with two columns. I would like to add NA to the first column of the text file.
Input:
19625 10.4791768259
19700 10.8146489183
19701 10.9084026759
19702 10.9861346978
19703 10.9304364984
Output:
NA19625 10.4791768259
NA19700 10.8146489183... (1 Reply)
i have a log file that has the date and time that looks like this:
Wed Jun 28 15:46:21 2012 test failed tailed passed passed not error panic
what we want to focus on is the first 5 columns because they contain the date and time.
the date and time can be anywhere on the line. in this... (6 Replies)
Hi,
I want to add a text to the end of the specific line in a file. Now my file looks like this:
999
111
222
333
111
444
I want to add the string " 555" to the end of the first line contaning 111. Moreover, I want to insert a newline after this line containg the "000" string. The... (8 Replies)
This could be a really dummy question.
I have a log text file.
What unix command to extract line from specific string to another specific string.
Is it something similar to?:
more +/"string" file_name
Thanks (4 Replies)
Discussion started by: aku
4 Replies
LEARN ABOUT REDHAT
editdiff
REDIFF(1)REDIFF(1)NAME
rediff, editdiff - fix offsets and counts of a hand-edited diff
SYNOPSIS
rediff ORIGINAL EDITED
rediff EDITED
rediff {--help | --version}
editdiff FILE
editdiff {--help | --version}
DESCRIPTION
You can use rediff to correct a hand-edited unified diff. Take a copy of the diff you want to edit, and edit it without changing any off-
sets or counts (the lines that begin ``@@''). Then run rediff, telling it the name of the original diff file and the name of the one you
have edited, and it will output the edited diff file but with corrected offsets and counts.
A small script, editdiff, is provided for editing a diff file in-place.
The types of changes that are currently handled are:
o Modifying the text of any file content line (of course).
o Adding new line insertions or deletions.
o Adding, changing or removing context lines. Lines at the context horizon are dealt with by adjusting the offset and/or count.
o Adding a single hunk (@@-prefixed section).
o Removing multiple hunk (@@-prefixed sections).
Alternatively, if only one argument is provided, it is taken to be the edited file and the counts and offsets are adjusted as appropriate.
Some assumptions are made when used in this mode. See recountdiff(1) for more information.
OPTIONS --help Display a short usage message.
--version
Display the version number of rediff.
SEE ALSO interdiff(1), recountdiff(1)AUTHOR
Tim Waugh <twaugh@redhat.com>.
patchutils 13 May 2002 REDIFF(1)