Sponsored Content
Full Discussion: Increment ABC-123 by 1!!
Top Forums Shell Programming and Scripting Increment ABC-123 by 1!! Post 302320635 by ghostdog74 on Thursday 28th of May 2009 12:43:04 PM
Old 05-28-2009
Code:
# v=ABC-123
# IFS=-
# set -- $v
# echo $(( $2+1 ))
124
# echo "$1-$(( $2+1 ))"
ABC-124

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to make ABC into "ABC" ina file

suppose u have a file ABC CDF ADF FDG HAA AHH AHA so output shud be like "ABC" "CDF" "ADF" FDG " "HAA" "AHH" "AHA" (8 Replies)
Discussion started by: cdfd123
8 Replies

2. Shell Programming and Scripting

String start with ABC

Hi, How to find out the words starting with ABC in a file (K shell) I dont want the word having ABC in middle of any string. Thanks Subrat (1 Reply)
Discussion started by: subrat
1 Replies

3. Shell Programming and Scripting

Perl:string substitution Pattern: ='abc...',

Hi friends, I want to substitute "a ='....'," with ":" in everywhere in a string using Perl. Details: ---------- my $str= " c1='fgfasfgasggfgff.,akhkhahha', c2='bbbn', c3='hg5 sh' "; Required o/p: $str= " c1:c2:c3 " I tried as below: $str=~ s/=\'.*\',/:/g ; print "str=... (14 Replies)
Discussion started by: Niroj
14 Replies

4. Shell Programming and Scripting

What is difference between ./abc.sh and . abc.sh

Hi Friends I have one shell script abc.sh If I run it ./abc.sh and . abc.sh , then what is the difference.. Thanks Joy:confused: (1 Reply)
Discussion started by: itsjoy2u
1 Replies

5. UNIX for Dummies Questions & Answers

Replace 'abc' with 'xyz'

Hi everyone I am new to unix . i got struck up with small issue. i have text file something like this abc 'xyz' '5' pqr 'lmn' '6' i want to replace abc 'xyz' '5' with abc 'tyr' '9' but i know the key 'xyz' based on the key 'xyz' i want to replace please help me . its... (3 Replies)
Discussion started by: Vijayaragavan
3 Replies

6. Shell Programming and Scripting

get value between <abc and > by perl, awk

Hi Everyone, cat 1.txt a <abc b vfff c 000> d 4444 the output is: <abcvfff000> by using perl or awk, can get the value betwee "<abc" and ">", assume 1.txt has lots of those tags, so the output can filter out all those values. Please advice. Thanks (4 Replies)
Discussion started by: jimmy_y
4 Replies

7. UNIX for Dummies Questions & Answers

egrep 'TextToFind' certainSubFolders/*.abc

Hi, I'm trying to do the following and can't figure out how to achieve it. On my computer there are a number of folders called 'program' at various levels. I would like to search for these folders (that are below my current level) and then use egrep to search for a string within files that... (6 Replies)
Discussion started by: js8765
6 Replies

8. AIX

Rootvg /abc file is full

In rootvg /abc file is full,I want to increase,but there is no free pps,how will u do it? (1 Reply)
Discussion started by: ramraj731
1 Replies
MSGFMT_FORMAT_MESSAGE(3)						 1						  MSGFMT_FORMAT_MESSAGE(3)

MessageFormatter::formatMessage - Quick format message

	Object oriented style

SYNOPSIS
publicstatic string MessageFormatter::formatMessage (string $locale, string $pattern, array $args) DESCRIPTION
Procedural style string msgfmt_format_message (string $locale, string $pattern, array $args) Quick formatting function that formats the string without having to explicitly create the formatter object. Use this function when the format operation is done only once and does not need and parameters or state to be kept. PARAMETERS
o $locale - The locale to use for formatting locale-dependent parts o $pattern - The pattern string to insert things into. The pattern uses an 'apostrophe-friendly' syntax; it is run through umsg_autoQuoteA- postrophe before being interpreted. o $args - The array of values to insert into the format string RETURN VALUES
The formatted pattern string or FALSE if an error occurred EXAMPLES
Example #1 msgfmt_format_message(3) example <?php echo msgfmt_format_message("en_US", "{0,number,integer} monkeys on {1,number,integer} trees make {2,number} monkeys per tree ", array(4560, 123, 4560/123)); echo msgfmt_format_message("de", "{0,number,integer} Affen auf {1,number,integer} Baumen sind {2,number} Affen pro Baum ", array(4560, 123, 4560/123)); ?> Example #2 OO example <?php echo MessageFormatter::formatMessage("en_US", "{0,number,integer} monkeys on {1,number,integer} trees make {2,number} monkeys per tree ", array(4560, 123, 4560/123)); echo MessageFormatter::formatMessage("de", "{0,number,integer} Affen auf {1,number,integer} Baumen sind {2,number} Affen pro Baum ", array(4560, 123, 4560/123)); ?> The above example will output: 4,560 monkeys on 123 trees make 37.073 monkeys per tree 4.560 Affen auf 123 Baumen sind 37,073 Affen pro Baum SEE ALSO
msgfmt_create(3), msgfmt_parse(3), msgfmt_get_error_code(3), msgfmt_get_error_message(3). PHP Documentation Group MSGFMT_FORMAT_MESSAGE(3)
All times are GMT -4. The time now is 09:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy