version info :
vi availabe with RHEL 5.4
I have a text file with 10,000 lines. I want to copy lines from 5000th line to 7000th and redirect to a file. Any idea how I can do this?
Note:
The above scenario is just an example. In my actual requirement, the file has 14 million lines and I want to copy 2000 lines after the 12th million line
BTW.I've just realised that the vi editor we use in RHEL is actually VIM
Hello everybody,
My question is: how to add /tmp/work at the end of line in vi editor.
my file looks like:
cp file1
cp file2
cp file3
****
I need to add " /tmp/work" at the end of each line.
I tried this
:%s/$/" /tmp/work"
and this
:%s/$/\ /tmp/work\/
but it does not work. (2 Replies)
Hi,
how can I add at the begining and at the end of all of the lines of my text file in VI editor ? Many thanks before.
for exemple if in my file i have
line 1
line 2
I want to have :
start line 1 end
start line 2 end (3 Replies)
I am new in hp ux and I want work with vi editor, but in hp ux vi editor the backspaes and del keys doesn't work.
how can I enable them.
thanks (3 Replies)
Hi,
I knw its a silly question, but am a newbie to 'vi' editor. I'm forced to use this, hence kindly help me with this question.
How can i paste a chunk 'copied from' a different editor(gedit) in 'vi editor'?
As i see, p & P options does work only within 'vi'. (10 Replies)
Hi All,
I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by
set EDITOR=vi it does not open a vi editor , rather it do as below.....
/////////////////////////////////////////////////////
$ set... (6 Replies)
Hello All,
Need one Help for one issue.
I am using a French Keyboard, so @ sign is on key 0 and i have to use right Alt + 0 to print it.
It is working everywhere but not inside Vi editor. I can type @ in shell, in notepad. But inside Vi editor it is not working, another problem is that if... (2 Replies)
I was looking through the topics and I wasn't sure if this was the best place to post this question:
I was wondering, out of curiosity, which software everyone was using to code their scripts in. I do mostly sh/ksh and my favorite has always been EditPlus because it is small, fast, yet powerful.... (409 Replies)
Discussion started by: yongho
409 Replies
LEARN ABOUT CENTOS
redhat-upgrade-tool-cli
REDHAT-UPGRADE-TOOL(8) redhat-upgrade-tool User Manual REDHAT-UPGRADE-TOOL(8)NAME
redhat-upgrade-tool - Red Hat Upgrade tool
SYNOPSIS
redhat-upgrade-tool [OPTIONS] SOURCE
DESCRIPTION
redhat-upgrade-tool is the Red Hat Upgrade tool.
The redhat-upgrade-tool client runs on the system to be upgraded. It determines what packages are needed for upgrade and gathers them from
the source(s) given. It also fetches and sets up the boot images needed to run the upgrade and sets up the system to perform the upgrade at
next boot.
The actual upgrade takes place when the system is rebooted, using the boot images set up by redhat-upgrade-tool. The upgrade initrd starts
the existing system (mostly) as normal, lets it mount all the local filesystems, then starts the upgrade.
When the upgrade finishes, it reboots the system into the newly-upgraded OS.
OPTIONS
Optional arguments
-h, --help
Show a help message and exit.
-v, --verbose
Print more info.
-d, --debug
Print lots of debugging info.
--debuglog DEBUGLOG
Write debugging output to the given file. Defaults to /var/log/redhat-upgrade-tool.log.
--reboot
Automatically reboot to start the upgrade when ready.
SOURCE
These options tell redhat-upgrade-tool where to look for the packages and boot images needed to run the upgrade. At least one of these
options is required.
--device [DEV]
Device or mountpoint of mounted install media. If DEV is omitted, redhat-upgrade-tool will scan all currently-mounted removable devices
(USB disks, optical media, etc.)
--iso ISO
Installation image file.
--network VERSION
Online repos matching VERSION (a number or "rawhide")
Multiple sources may be used, if desired.
Additional options for --network
--enablerepo REPOID
Enable one or more repos (wildcards allowed).
--disablerepo REPOID
Disable one or more repos (wildcards allowed).
--addrepo REPOID=[@]URL
Add the repo at URL. Prefix URL with @ to indicate that the URL is a mirrorlist.
--instrepo REPOID
Get upgrader boot images from the repo named REPOID. The repo must contain a valid .treeinfo file which points to the location of
usable kernel and upgrade images.
Cleanup commands
--resetbootloader
Remove any modifications made to bootloader configuration.
--clean
Clean up everything written by redhat-upgrade-tool.
EXAMPLES
redhat-upgrade-tool --network 7.0 --instrepo <repo URL>
Upgrade to RHEL 7.0 by downloading all needed packages and data from the specified repository.
redhat-upgrade-tool --device --network 7.0
Upgrade to RHEL 7.0 using install media mounted somewhere on the system, fetching updates from the network if needed.
EXIT STATUS
0
Success.
1
Cancelled by user, failure writing files to disk, or other unknown error
2
Failed to download/copy files from the given SOURCE
3
RPM upgrade transaction test failed
BUGS
The --iso image must be on a filesystem listed in /etc/fstab.
AUTHORS
Will Woods <wwoods@redhat.com>
redhat-upgrade-tool 11/08/2013 REDHAT-UPGRADE-TOOL(8)