:g/Local/s//Remote/gp Substitutes every occurrence of the word (Web hosting resellers)

:g/Local/s//Remote/gp Substitutes every occurrence of the word Local with the word Remote in the entire file, then prints each line so that you can see the changes (piping it through more if output fills more than one page). Using numbers with commands You can precede most vi commands with numbers to have the command repeated that number of times. This is a handy way to deal with several lines, words, or characters at a time. Here are some examples: 3dw Deletes the next three words. 5cl Changes the next five letters (that is, removes the letters and goes into input mode). 12j Moves down 12 lines. Putting a number in front of most commands just repeats those commands. At this point, you should be fairly proficient at using the vi command. Summary Working from a shell command-line interpreter within Red Hat Linux may not be as simple as using a GUI, but it offers many powerful and flexible features. This chapter describes how to log in to Red Hat Linux and work with shell commands. Features for running commands include recalling commands from a history list, completing commands, and joining commands in various ways. This chapter describes how shell environment variables can be used to store and recall important pieces of information. It also teaches you to modify shell configuration files to tailor the shell to suit your needs. Finally, the chapter describes how to use the Red Hat Linux file system to create files and directories, understand permissions, and work with files (moving, copying, and removing them).
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision shared web hosting services

Leave a Reply