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
SKB editing action in tc(8)                                            Linux                                           SKB editing action in tc(8)

NAME
skbedit - SKB editing action SYNOPSIS
tc ... action skbedit [ queue_mapping QUEUE_MAPPING ] [ priority PRIORITY ] [ mark MARK ] ptype PTYPE ] DESCRIPTION
The skbedit action allows to change a packet's associated meta data. It complements the pedit action, which in turn allows to change parts of the packet data itself. The most unique feature of skbedit is it's ability to decide over which queue of an interface with multiple transmit queues the packet is to be sent out. The number of available transmit queues is reflected by sysfs entries within /sys/class/net/<interface>/queues with name tx-N (where N is the actual queue number). OPTIONS
queue_mapping QUEUE_MAPPING Override the packet's transmit queue. Useful when applied to packets transmitted over MQ-capable network interfaces. QUEUE_MAPPING is an unsigned 16bit value in decimal format. priority PRIORITY Override the packet classification decision. PRIORITY is either root, none or a hexadecimal major class ID optionally followed by a colon (:) and a hexadecimal minor class ID. mark MARK Change the packet's firewall mark value. MARK is an unsigned 32bit value in automatically detected format (i.e., prefix with '0x' for hexadecimal interpretation, etc.). ptype PTYPE Override the packet's type. Useful for setting packet type to host when needing to allow ingressing packets with the wrong MAC address but correct IP address. PTYPE is one of: host, otherhost, broadcast, multicast SEE ALSO
tc(8), tc-pedit(8) iproute2 12 Jan 2015 SKB editing action in tc(8)
All times are GMT -4. The time now is 09:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy