Sponsored Content
Full Discussion: More formatted string
Top Forums Shell Programming and Scripting More formatted string Post 302316250 by devtakh on Thursday 14th of May 2009 01:19:27 PM
Old 05-14-2009
Code:
awk 'END{print $0}' file| sed 's/^[0-9]0*\(.*\)/\1/g'


cheers,
Devaraj Takhellambam
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Formatted output in KSH

Hi, Is there some way to get formatted output in ksh? Something like a properly alligned tabular format. I tried adding '\t' to echo statements, but it doesn't come properly alligned 'hello' A simple Hello 'helloworld' A helloworld statement I need the second coloumn to... (1 Reply)
Discussion started by: psynaps3
1 Replies

2. Shell Programming and Scripting

Convert DATE string to a formatted text

Hi guys, i need your help. I need to convert a date like this one 20071003071023 , to a formated date like 20071003 07:10:23 . Could this be possible ? Regards, Osramos (6 Replies)
Discussion started by: osramos
6 Replies

3. Shell Programming and Scripting

Formatted Output

Hi I have the following lines in a file SWPRC000001NOT STATED 1344 SWPRC000001NOT STATED 1362 SWPRC000001NOT STATED 1418 SWPRC000001NOT STATED 1436 SWPRC000001NOT STATED ... (6 Replies)
Discussion started by: dhanamurthy
6 Replies

4. Shell Programming and Scripting

csh formatted strings

Hi, currently I'm trying to write a csh script that should do the following: set i = 1 while ($i < 100) { cp AAA BBB set i = $i +1 } where AAA is a string like this file.11.txt, file.21.txt, ... and BBB is a string like this file_0001, file_0002, ... Is it possible to... (1 Reply)
Discussion started by: sera1711
1 Replies

5. UNIX for Dummies Questions & Answers

Finding string and getting formatted ouput

I have follwoing text file as alarm dump. A1/EXT "B25I11K0150_F W" 512 090629 1121 RADIO X-CEIVER ADMINISTRATION BTS EXTERNAL FAULT MO RSITE CLASS RXOCF-405 DKRD01_INDS 1 EXTERNAL ALARM MAINS FAIL ... (1 Reply)
Discussion started by: lalchand
1 Replies

6. Shell Programming and Scripting

String searching and output to a file in a formatted text

Hi, I'm very new to UNIX scripting and find quite difficult to understand simple UNIX syntax. Really appreciat if somebody could help me to give simple codes for my below problems:- 1) I need to search for a string "TTOH 8031950001" in a files which filename will be "*host*'. For example, the... (3 Replies)
Discussion started by: cuji
3 Replies

7. UNIX for Advanced & Expert Users

A formatted df script or alias ... ???

Hi gurus, Does anyone have a df script/alias that is sort of "universal"? Just getting frustrated to use bdf for HP-UX, df -h for Linux and Solaris, df -G/g (???) for AIX ... and to make things even worse, some are NFS mount points or with long logical volume name and it extends over two (2)... (1 Reply)
Discussion started by: newbie_01
1 Replies

8. UNIX for Dummies Questions & Answers

Request for Formatted Output

Can you please tell me how to just get only the output of dealers I & V information along with their subtotals in the next line of the file and create a new file, The dealer position along with corresponding totals may change everyday to any position above or below in the file, please help Thanks (2 Replies)
Discussion started by: Ariean
2 Replies

9. Shell Programming and Scripting

How to get the formatted string with reg?

Source is " LG 0 0 18 14 172.16.2.20 1 2 OK T OK T OK T" How to get the following format string with reg? LG 0 0, 18 Thanks in advance. (10 Replies)
Discussion started by: janex
10 Replies

10. UNIX for Dummies Questions & Answers

Help creating well-formatted columns

Hi all I'm having a few issues with sorting some data into easily-readable columns. Original data in file: Number of visits IP Address 8 244.44.145.122 8 234.45.165.125 6 225.107.26.10 I firstly tried the column -t command which results in this: Number of ... (4 Replies)
Discussion started by: semaj
4 Replies
wcstoimax(3C)															     wcstoimax(3C)

NAME
wcstoimax(), wcstoumax() - convert wide character string to long integer SYNOPSIS
DESCRIPTION
or converts the wide character string pointed to by nptr to or representation, respectively. The wide character string is scanned up to the first wide character inconsistent with the base. Leading ``white-space'' wide characters (as defined by in wctype(3C)) are ignored. If no conversion can take place, zero is returned. If base is greater than or equal to 2 and less than or equal to 36, it is used as the base for conversion. After an optional leading sign, leading zeros are ignored, and or is ignored if base is 16. If base is zero, the wide character string itself determines the base as follows: after an optional leading sign, a leading zero indicates octal conversion; a leading or indicates hexadecimal conversion. Otherwise, decimal conversion is used. If the value of endptr is not a pointer to the wide character terminating the scan is returned in the location pointed to by endptr. If no integer can be formed, the location pointed to by endptr is set to nptr, and zero is returned. Definitions for these functions and the type are provided in the header file. EXTERNAL INFLUENCES
Locale The category determines how wide character codes are interpreted. International Code Set Support Single- and multi-byte character code sets are supported. RETURN VALUE
Upon successful completion, both functions return the converted value, if any. If the correct value would cause overflow: returns or (according to the sign of the value), and sets to returns and sets to For all other errors, zero is returned and is set to indicate the error. ERRORS
and fail and is set, if any of the following conditions are encountered: The value of base is not supported. The value to be returned would have caused overflow. AUTHOR
and were developed by HP. SEE ALSO
wctype(3C), wcstod(3C), wcstol(3C), scanf(3S), thread_safety(5). STANDARDS CONFORMANCE
wcstoimax(3C)
All times are GMT -4. The time now is 07:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy