Sponsored Content
Top Forums Shell Programming and Scripting inserting a character between string Post 302210381 by dakid on Monday 30th of June 2008 10:33:04 PM
Old 06-30-2008
inserting a character between string

i have a file contains like this:

Quote:
0100159457Italy Accounts
0100159458Italy Accounts
0100162198USA Accounts
i want to create a script that will insert a comma "." after the 10th character so it would be look like this

Quote:
0100159457,Italy Accounts
0100159458,Italy Accounts
0100162198,USA Accounts
thanks in advance
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Inserting a character in a data file

Can some one tell me how I can insert a "|" (pipe) at the 15th column throughout a file? examples: to insert at begining of line i use :g/^/s//\|/ to insert at ene of line i use :g/$/s//\|/ how can i insert at the 15th column position. Thanks in advance (2 Replies)
Discussion started by: jxh461
2 Replies

2. Shell Programming and Scripting

inserting a String in the file(s)

Hi, I'm a newbee to Unix shell scripting. I want to write a shell script that inserts a new String(name&value pair) into a file(s) at a particular place.I willl have to write one script which when executed should insert a new variable in all the files in that particular directory. Say for eg:... (4 Replies)
Discussion started by: 2tbee
4 Replies

3. Shell Programming and Scripting

Inserting character in every line

help me, is there any script i can use to insert a single character in every line of the whole file? (1 Reply)
Discussion started by: dakid
1 Replies

4. Shell Programming and Scripting

Inserting newline in front of multi-character string

I'm working with a large file with multiple records, each record begins with ISA. The issue is, sometimes ISA is at the start of the line, sometimes it's in the middle of the line. So before I can csplit my main file into multiple records, I have to get each record header onto its own line. ... (7 Replies)
Discussion started by: verge
7 Replies

5. Shell Programming and Scripting

Inserting a string in another sting

Hi Experts, I need to insert a sting into another string at a specified position. Like the below. Regards, Tin-Tin (3 Replies)
Discussion started by: tinufarid
3 Replies

6. Shell Programming and Scripting

[Solved] SED - Bash - Inserting multi Tab character in the command

Hello. I am using : sed -i -e '/§name_script§/a#'"${MY_TAB11}"'# \ #'"${MY_TAB1}"'The Standard way'"${MY_TAB7}"'# \ #'"${MY_TAB1}"'==============='"${MY_TAB7}"'# \ ' "$CUR_FILE" Is there a better way to define "MY_TAB7","MY_TAB11" in other way than : MY_TAB1=$'\t' MY_TAB2=${MY_TAB1}$'\t'... (2 Replies)
Discussion started by: jcdole
2 Replies

7. Shell Programming and Scripting

Bash - Inserting non printable character(s) in string variable

Hello. I have a string variable named L_TEMP to test a very simple filter. L_TEMP="50AwL.|KWp9jk" I want to insert a non printable character between K and W. I have try this : linux-g65k:~ # a='50AwL.|K' linux-g65k:~ # b='Wp9jk' linux-g65k:~ # L_TEMP="$a$'\x07'$b" linux-g65k:~ # echo... (6 Replies)
Discussion started by: jcdole
6 Replies

8. Shell Programming and Scripting

Inserting a header with special character

Hi, I am trying to insert header row with a special character delimiter with Unicode u0109 into a file with ‘echo’, header looks like below echo –e “header1\u0109header\u0109header3\u0109header4” It just inserting as it is in the quotes but not the special character, Please suggest if am... (2 Replies)
Discussion started by: oom
2 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

Inserting a non printable character in a file

For some testing I want to insert a non printable character in a file. How to do it? I inserted ctrl-v ctrl-k through vi. But I do not think it is a proper non printable character. (3 Replies)
Discussion started by: Soham
3 Replies
gnome-character-map(1)						   User Commands					    gnome-character-map(1)

NAME
gnome-character-map, gucharmap - insert special characters into a document SYNOPSIS
gnome-character-map [--font=string] DESCRIPTION
The Character Map application enables you to select characters from a character table, then combine the characters into a text string with standard characters. You can insert the text string that you create into other applications, such as text editor documents. Character Map provides accented characters, mathematical symbols, special symbols, and punctuation marks. Many of the characters are not available on a standard keyboard. OPTIONS
The following options are supported: --font=string Specify the font name and point size that you want to use to display the characters in the character table, when you start Character Map. EXAMPLES
Example 1: Launching Character Map example% gnome-character-map Example 2: Launching Character Map With Specified Font Name and Point Size example% gnome-character-map --font="bitstream vera sans italic 20" EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gnome-character-map Executable for Character Map. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-character-map | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
Character Map Manual Latest version of the GNOME Desktop User Guide for your platform. NOTES
Written by Glynn Foster, Sun Microsystems Inc., 2003. SunOS 5.10 20 Jan 2004 gnome-character-map(1)
All times are GMT -4. The time now is 12:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy