Sponsored Content
Full Discussion: Substitute Command in vi
Top Forums UNIX for Dummies Questions & Answers Substitute Command in vi Post 66050 by reborg on Thursday 10th of March 2005 04:17:06 PM
Old 03-10-2005
command mode:

:1,$s/WORD_TO_REPLACE/WORD_TO_SUBSTITUTE/g
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Substitute in vi

I know in vi you can do :%s/replaceme/withthis/ but if i want to find all lines say without a # at the begining and I want to put it in how would that command be formatted? I can't figure it out for the life of me. #comment blah1 hey1 grrr1 #comment #blah1 #hey1 #grrr1 (5 Replies)
Discussion started by: kingdbag
5 Replies

2. UNIX for Dummies Questions & Answers

how to write perl substitute command in shell scripts

How to write perl substitute command in shell script without invoking a perl script file seperately. for ex: shell script to relace IT with CSC in a file using perl substitute command. (3 Replies)
Discussion started by: param_it
3 Replies

3. Shell Programming and Scripting

How to substitute?

Hi, I have query terms like this: a) apple bannana b) apple bannana AND chickko c) "milk shake" OR Graphes orange whereever there is space substitue with AND operator. I tried like this: (2 Replies)
Discussion started by: vanitham
2 Replies

4. Shell Programming and Scripting

vi substitute

My question is how would I substitute for ceratain number of occurences in a line? If this is my input rjohns BFSTDBS01 Standard Silver NPRO30DINCR 2 Client Is it possible to change the first 3 occurences of space " " to a comma? (7 Replies)
Discussion started by: reggiej
7 Replies

5. Shell Programming and Scripting

howto substitute word in vi command mode

Hi I'm trying to substitute word "January" with word "March" in my script but in certain lines only. I have couple words containing pattern that I want to substitute e.g. - log.January.1.array - log_January_1_array_1 - log.January.1.array - log_January_1_array_11 Trying to do cmd below... (9 Replies)
Discussion started by: presul
9 Replies

6. Shell Programming and Scripting

substitute the starting dollar sign in command with blank

Hi,, Let example cmd: $$config/all Here I want to replace or subsitute blank space and also with any other character in place of "$" sign...and also want to replace backslash (/) with forward (\)......in expect script please could any one help on this.....thank you (2 Replies)
Discussion started by: swethakast
2 Replies

7. UNIX for Dummies Questions & Answers

Substitute in VI

Hi there, i am updating a file on UNIX and have many lines as per below : listen:x:37:4:Network Admin:/usr/net/nls: i would like to substitute from the :/usr to the end of the line. so at the moment im using this : :s/"\/$/ /g but i get an error.can anyone help? thank you (3 Replies)
Discussion started by: brian112
3 Replies

8. Shell Programming and Scripting

sed substitute command -- need help

I am trying to do what I thought should be a simple substitution, but I can't get it to work. File: Desire output: I thought I'd start with a sed command to remove the part of the header line preceding the string "comp", then go on to remove the suffix of the target string (e.g. ":3-509(-)"),... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

9. Shell Programming and Scripting

sed command to substitute contents from external file

Hi All, I am trying to substitute a line in my existing file with the set of lines from another file. Regarding the existing file, i am sure that the line i am substituting will occur only at one place. I have stored the text to be replaced in another file. I am using below command. cat... (7 Replies)
Discussion started by: chpsam
7 Replies

10. Shell Programming and Scripting

Substitute grep command at run time

HI I am trying to use the following code in the shell script (using grep) usage() { echo "Usage: ./$0 <file name> <interval> <pattern>" } METRICS_FILE=$1 INTERVAL=$2 PATTERN="$3" .. if then PATTERN="grep Gx" fi COUNT=`cat ${METRICS_FILE} | "${PATTERN}" |egrep... (8 Replies)
Discussion started by: asifansari
8 Replies
vparconfig(1M)															    vparconfig(1M)

NAME
vparconfig - specify the partition mode policy, partition CLM policy, and partition ILM policy for the next system boot SYNOPSIS
[mode]] memtype size DESCRIPTION
The command sets the EFI variable that determines the partition mode on Itanium-based systems and then automatically reboots the system. The partition mode policy can be vPars or nPars. In addition, the command sets the partition ILM policy EFI variable (for InterLeaved Memory) and the partition CLM policy EFI variable (for Cell Local Memory). However, the reboot does not happen automatically. The partition ILM policy or partition CLM policy change will only occur when you reboot the system using the command. The default behavior of the command specified without any options is to display the current settings of the partition mode policy, the par- tition ILM policy, and the partition CLM policy. This command is only available at the EFI shell if the vPars depot has been installed on the disk. This command is not supported on PA-RISC platforms. Options and Arguments recognizes the following command line options and arguments: Specifies the partition mode for the next system boot and then automatically reboots the system. The valid values for mode are case-insen- sitive and The system reboots in the following ways: o If mode is then after reboot, the system will be in vPars mode. vPars mode allows you to boot the vPars Monitor and virtual partitions in the next nPartition boot. o If mode is then after reboot, the system will be in nPars mode. In nPars mode you cannot boot the vPars Monitor or virtual partitions. However, you can boot HP-UX as a standalone operating system. o If is specified with no arguments, then the system reboots with the existing mode. memtype size Specifies the desired granularity of Cell Local Memory (CLM) or InterLeaved Memory (ILM) to be set in the appropriate EFI variable for the next reboot. memtype is either or size specifies the desired granularity in megabytes corresponding to memtype. Only a decimal value is allowed to specify the gran- ule size. Displays command line options and arguments. EXAMPLES
Reboot the system to mode. Reboot the system to mode. Set the ILM granularity to 128 MB. Set the CLM granularity to 128 MB. AUTHOR
was developed by the Hewlett-Packard Company. SEE ALSO
vparenv(1M). Itanium(R)-Based Systems Only vparconfig(1M)
All times are GMT -4. The time now is 02:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy