Sponsored Content
Top Forums Shell Programming and Scripting In Sed how can I replace starting from the 7th character to the 15th character. Post 302455851 by alister on Wednesday 22nd of September 2010 01:50:21 PM
Old 09-22-2010
One more (minor variation of Franklin52's second option):
Code:
sed "s/\(.\{6\}\).\{9\}/\1$VAR1/"

Regards,
Alister
This User Gave Thanks to alister For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How To Make Decimal Point Fall On The 15th Character On The Screen

If i have a variable which is a decimal number, i.e 34.05 How can you make decimal point fall on the 15th character on the screen? Or any other that you can specify? Can you do it using sed or awk? (3 Replies)
Discussion started by: Vozx
3 Replies

2. Shell Programming and Scripting

read in a file character by character - replace any unknown ASCII characters with spa

Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/ Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies

3. Shell Programming and Scripting

Sed Replace a repeating character

I have a text file and every line ends in |^ |^^ |^^^ |^^^^ I need to use sed to make all lines end it |^ regardless of the amount of carrots. The code i was using is: cat FILE | sed 's/\^\^\^/\^/g' But then they threw that curveball at me. Also is there a way to... (2 Replies)
Discussion started by: insania
2 Replies

4. Shell Programming and Scripting

Get rid of the 7th character of each line if this is a space

I have a text file like this ... B 16 1.340E+05 A 18 3.083E+02 Wu123 1.365E+02 ... I would like to get rid of the 7th character of each line if this is a space character. Thank you, Sarah (5 Replies)
Discussion started by: f_o_555
5 Replies

5. Shell Programming and Scripting

sed help,to replace the last character

cat input.txt agsbdafgd ertebrtreter ahrbrwerg The last character of a line that does not start with a would be changed to Z. Final output: agsbdafgd ertebrtreteZ ahrbrwerg Can anyone post the sed command to do that? (2 Replies)
Discussion started by: cola
2 Replies

6. Shell Programming and Scripting

Replace multiple occurances of same character with a single character.

Hi all, Greetings, I have the following scenario, The contents of main file are like : Unix|||||forum|||||||||||||||is||||||the||best so||||||be|||||on||||||||||||||||||||||||||||||||||||||||||||it And i need the output in the following form: Unix=forum=is=the=best so=be=on=it ... (3 Replies)
Discussion started by: dipanchandra
3 Replies

7. Shell Programming and Scripting

Find character and Replace character for given position

Hi, i want find the character '-' in a file from position 284-298, if it occurs i need to replace it with 'O ' for the position in the file. How to do that using SED command. thanks in advance, Sara (9 Replies)
Discussion started by: Sara183
9 Replies

8. UNIX for Advanced & Expert Users

Replace certain character at specific place with related character

hello i have file with 100k records and each one has certain value that starts at 28th column and certain value that starts at 88th column e.g. 1st file <25>1234567 ..... <88> 8573785485 i have aditional file with values which are related to value that starts at 88th column of the... (1 Reply)
Discussion started by: dell1520
1 Replies

9. Shell Programming and Scripting

sed searches a character string for a specified delimiter character, and returns a leading or traili

Hi, Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank. Text file : "1"|"ExternalClassDEA519CF5"|"Art1" "2"|"ExternalClass563EA516C"|"Art3" "3"|"ExternalClass305ED16B8"|"Art9" ... ... ... (2 Replies)
Discussion started by: fspalero
2 Replies

10. Shell Programming and Scripting

awk or other way to find out number of occurrence of 7th character

Hi all, I am looking for to filter out based on 7th character and list the number of occurrence based on the 7th character if p , d , o or m 1. if 7th character is p , Output should be: p_hosts = N 2. if 7th character is d , Output should be: d_hosts = N 3. if 7th character is o , Output... (10 Replies)
Discussion started by: rveri
10 Replies
CONTEXTFREE(1)							   Context Free 						    CONTEXTFREE(1)

NAME
cfdg - image generator based on context-free grammars SYNOPSIS
cfdg [options] input.cfdg [output.png/svg] DESCRIPTION
Context Free is a system that produces images based on context-free grammars. cfdg is the command-line program to generate the actual images (in PNG or SVG format) from the input.cfdg file containing these grammars. If - is specified instead of an input file, the grammar is read from standard input. The output filename can be left out if the -o option is used. Note that the output mode (PNG or SVG) is not detected depending on the specified extension, but must be explicitly set using the -V option. OPTIONS
All command-line options consist of a single letter, and an optional argument. A summary of options supported by cfdg is included below. -w width Set width of the output image in pixels (for PNG) or millimeters (for SVG) (default: 500). -h height Set height of the output image in pixels (for PNG) or millimeters (for SVG) (default: 500). -s size Set both width and height of the output image in pixels (for PNG) or millimeters (for SVG). -m maximum shapes amount Set the maximum number of shapes rendered (default: no maximum). -x minimum shape size Set the minimum size for a shape to be rendered in pixels/mm (default: 0.3). -b border size Set the border size: -1 for a -8 pixel border, 0 for no border, 1 for an 8 pixel border, or 2 for a variable-sized border. -v variation code Set the variation code (default: random). This code determines what the final image will look like when the input contains non- deterministic rules. -o filename Set the output filename. In this filename, %f is replaced by the animation frame number (if any), %v and %V are replaced by the variation code (in lower or upper case, respectively), and %% is replaced by a literal %. -L Previous versions of cfdg created different designs for the same variation code depending on whether a big- or little-endian machine was used; now the little-endian variation is created on all machines. Use this option to get the old behaviour on a big-endian machine. -a number of frames Generate num animation frames (only possible using PNG output). -z Zoom out during animation, when producing an animation using -a. -V Generate SVG (vector) output. -c Crop image output. -q Quiet mode; suppress non-error output. -? Show summary of options. SEE ALSO
More information can be found on the Context Free website, at http://contextfreeart.org/. AUTHOR
Context Free was written by Chris Coyne, John Horigan and Mark Lentczner. This manual page was written by Bram Senders <bram@luon.net>, for the Debian project (but may be used by others). 2.2 2009-02-08 CONTEXTFREE(1)
All times are GMT -4. The time now is 01:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy