Sponsored Content
Full Discussion: Question on vi editing
Top Forums Shell Programming and Scripting Question on vi editing Post 302441392 by Tirmazi on Friday 30th of July 2010 01:31:35 PM
Old 07-30-2010
Question on vi editing

If I have a text file which I am editing with vi and I perform the following editing.
HTML Code:
:1,$s/\<green\>/blue/g
Later I decide to replace all ocurance of blue to red, then instead of writing the above editing line is there a way to recall it and work on it, instead of repeating the entire editing script?

Please suggest.
This User Gave Thanks to Tirmazi For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help editing a file

I have a data file which is a flat text file that has certain characters that are at the beginning of each line that identify it as being a certain type of data element. I want to write a small shell script that will take my data file and look at the beginning of certain lines and if it finds this... (8 Replies)
Discussion started by: Docboyeee
8 Replies

2. UNIX for Dummies Questions & Answers

Editing problem

Hi, I want to do this: original file: a a hello e e bye becames: a hello e bye I think this can be done with sed or tr, but I've already tried all the options and can't find the solution. Thanks in advance (2 Replies)
Discussion started by: pmpx
2 Replies

3. Shell Programming and Scripting

Editing Crontab

Hi I am not able to edit crontab. Following is the comand that is being issued $crontab -e 2764 ............ This is what I am able to see But when I do $crontab -l List of all the crontab entry is displayed. Also I am seeing one entry in my /etc/cron.d prw------- 1 root ... (6 Replies)
Discussion started by: pankajkrmishra
6 Replies

4. UNIX for Dummies Questions & Answers

File editing question

I have following simple file called testing.txt ... key1=value1,key2=value2,key3=value3 ... and so on I am trying to change it to key1=value1 key2=value2 key3=value3 I tried to use following code sed 's/,/\n/g' testing.txt > temp.txt && mv temp.txt testing.txt Yet, what I am... (3 Replies)
Discussion started by: arushunter
3 Replies

5. Shell Programming and Scripting

file editing

how to remove duplicate word in a file ? (2 Replies)
Discussion started by: mail2sant
2 Replies

6. Shell Programming and Scripting

substitution without editing

I have a script with 100's of lines in it. I want to edit the script with out manually openning it (with vi editor or some thing like that). Basically I want to do a substitution using regular expression (%s/G_/28_/i). Please let me know the best way to do this. (4 Replies)
Discussion started by: Lucky Ali
4 Replies

7. Shell Programming and Scripting

editing headers

Hi, I have a folder that contains many (multiple) files 1.fasta 2.fasta 3.fasta 4.fasta 5.fasta . . 100's of files Each such file have data in the following format for example: vi 1.fasta 58 390 A GTATACATTATTGATGAAGTCCACATGCTTTCTATGGGTGCCTTCAATGCGCTTTTAAAA (7 Replies)
Discussion started by: Lucky Ali
7 Replies

8. Post Here to Contact Site Administrators and Moderators

Editing your post

Hi, Can you please advise if there is an option to edit your original post or is the only option is to post a reply? Thanks in advance. (4 Replies)
Discussion started by: newbie_01
4 Replies

9. Shell Programming and Scripting

Bash script deleting my files, and editing files in subdirectories question

#!/bin/bash # name=$1 type=$2 number=1 for file in ./** do if then filenumber=00$number elif then filenumber=0$number fi tempname="$name""$filenumber"."$type" if (4 Replies)
Discussion started by: TheGreatGizmo
4 Replies

10. Shell Programming and Scripting

Convert vi editing to text editing

Dear Guru's I'm using Putty and want to edit a file. I know we generally use vi editor to do it. As I'm not good in using vi editor, I want to convert the vi into something like text pad. Is there any option in Putty to do the same ? Thanks for your response. Srini (6 Replies)
Discussion started by: thummi9090
6 Replies
ppmdither(1)						      General Commands Manual						      ppmdither(1)

NAME
ppmdither - ordered dither for color images SYNOPSIS
ppmdither [-dim power] [-red shades] [-green shades] [-blue shades] [ppmfile] DESCRIPTION
Reads a portable pixmap as input, and applies dithering to it to reduce the number of colors used down to the specified number of shades for each primary. The default number of shades is red=5, green=9, blue=5, for a total of 225 colors. To convert the image to a binary rgb format suitable for color printers, use -red 2 -green 2 -blue 2. OPTIONS
-dim power The size of the dithering matrix. The dithering matrix is a square whose dimension is a power of 2. power is that power of 2. The default is 4, for a 16 by 16 matrix. -red shades The number of red shades to be used, including black; minimum of 2. -green shades The number of green shades to be used, including black; minimum of 2. -blue shades The number of blue shades to be used, including black; minimum of 2. SEE ALSO
pnmdepth(1), ppmquant(1), ppm(5) AUTHOR
Copyright (C) 1991 by Christos Zoulas. 14 July 1991 ppmdither(1)
All times are GMT -4. The time now is 06:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy