Sponsored Content
Top Forums Shell Programming and Scripting Place , character after 3 digits from left to right in a string Post 302639517 by krupasindhu18 on Saturday 12th of May 2012 02:59:48 AM
Old 05-12-2012
Place , character after 3 digits from left to right in a string

Hi All,

Could anyone please help me, how to put ‘,' character after 3 digits from right to left count,among 17 digits sting. unix scripting
Example - I am having 12345678911234567 digits
Accepted result-- 12,345,678,911,234,567
Note- 12345678911234567 digits will be dynamic at run time, I don't know how many digit will generate may be less or more .
please help me
Thanks,
Krupa
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get the most left hand string ??

Hi, I remember once seeing a way to get the left most string in a word. Let's say: a="First.Second.Third" (separated by dot) echo ${a#*.} shows --> Second.Third echo ${a##*.} shows --> Third How do I get the the left most string "First" Or "First.Second" ??? Tried to replace #... (2 Replies)
Discussion started by: jfortes
2 Replies

2. UNIX for Dummies Questions & Answers

to check if a string has only digits

Hi guys, I am not very experienced in writing ksh scripts and I am trying to write a piece of code that indicates if a given string contains only digits and no alphabet (upper or lower case). If i write it my way it would turn out to have a lot of comparisons.. :eek: Thanks a lot in... (3 Replies)
Discussion started by: lakshmikanth
3 Replies

3. Shell Programming and Scripting

Extract digits at end of string

I have a string like xxxxxx44. What's the best way to extract the digits (one or more) in a ksh script? Thanks (6 Replies)
Discussion started by: offirc
6 Replies

4. Shell Programming and Scripting

find the last digits of a string

print out 201 in following string, Please note the chars before 201 are random, no fixed format. ua07app201 (20 Replies)
Discussion started by: honglus
20 Replies

5. Shell Programming and Scripting

Insert a special character $ in place of extra spaces

Hi Experts, I have called some.txt with the following content. oracle HYRDSRVIHUB01 pts/0 TESTIHUB 07-JUN-10 CREATE TABLE TESTIHUB PHONE ... (12 Replies)
Discussion started by: naree
12 Replies

6. Shell Programming and Scripting

awk search between 2 digits a string

I would like to search between two a string. I thought this would be easy. The is always at the beginning of a line. The code: gawk '/^/{d=$1},/searchstring/,/^(d+1)/' or gawk '/^/,/searchstring/,/^/' did not return the desired result. inputfile.txt 999 some text searchstring some... (6 Replies)
Discussion started by: sdf
6 Replies

7. Shell Programming and Scripting

Terminate left side portion of a string

I have a awk file which consists of the follwoing code in file select.awk : /xxx/ { time = gensub(/xxx \*\*\*(.*)/, "\\1", "g") printf("%s\n",time) next } and an input file with the following file file.txt :- xxx ***Wed May 2 18:00:00 CDT 2012 AAA AAAA AAAA xxx... (4 Replies)
Discussion started by: shikshavarma
4 Replies

8. UNIX for Dummies Questions & Answers

How to search for a file having a particular character in a particular place in a directory.?

Hi Guys, I want to search for a specific file in a directory which have a "b" letter as the 3rd character in the name of the file. For Example : /abc/efg/ldbjfblkj.sh /abc/efg/erublkd.sh /abc/efg/eibueora.sh /abc/efg/kfvnmnb.sh Since we have 2 files with "b" as a 3rd character in... (5 Replies)
Discussion started by: Pramod_009
5 Replies

9. 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

10. Shell Programming and Scripting

Extract n-digits from string in perl

Hello, I have a log file with logs such as 01/05/2017 10:23:41 : file.log.38: database error, MODE=SINGLE, LEVEL=critical, STATE: 01170255 (mode main how can i use perl to extract the 8-digit number below from the string 01170255 Thanks (7 Replies)
Discussion started by: james2009
7 Replies
BDFRESIZE(1)						      General Commands Manual						      BDFRESIZE(1)

NAME
bdfresize - Resize BDF Format Font SYNOPSIS
bdfresize [-v] [-b number] [-[whf] factor] [bdf-file] DESCRIPTION
Bdfresize is a command to magnify or reduce fonts which are described with the standard BDF format. If bdf-file is not specified, it reads from stdin. Bdfresize outputs the result to stdout in BDF format. Some COMMENT lines are inserted to the result font. FONT name is modi- fied depending on the resize factor if the name is described in XLFD format. SIZE, FONTBOUNDINGBIX, SWIDTH, DWIDTH, BBX and some property lines are also modified. Other lines are copied from source. If a syntax error occurs in a source font, bdfresize notices it and stops the whole process. OPTIONS
-v Show the version number and exit. -b number Specify the blackness. Pixel values of a resized font are decided by this value. Default is 4. -w factor Specify the resize factor for the font width. -h factor Specify the resize factor for the font height. -f factor Same as ``-w factor -h factor''. factor is described in either of following forms. <digits> <digits>/<digits> SEE ALSO
bdftopcf(1), xfed(1), Character Bitmap Distribution Format 2.1 (Adobe Systems, Inc.), X Logical Font Description Conventions (MIT X Consor- tium Stardard) AUTHOR
Copyright (C) 1988, 1992 Hiroto Kagotani. kagotani@cs.titech.ac.jp BDF
12 October 1992 BDFRESIZE(1)
All times are GMT -4. The time now is 04:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy