10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
i have a fixed width file , where each line is 3200 length.
File:
1ABC 1111 2222 3333 000012341 1001
2ABC 1111 2222 3333 000012342 1002
3ABC 1111 2222 3333 000112343 1003
1DEF 5555 4444 9696 000012344 1004
2DEF 5555 2323 8686 000012345 1005
3DEF 5555 1212 7676 000012346 1006
... (1 Reply)
Discussion started by: mechvijays
1 Replies
2. UNIX for Dummies Questions & Answers
Using awk or sed, I'd like to remove leading spaces after a comma and before a right justified number in field 6. Sounds simple but I can't find a solution. Each field's formatting must stay intact.
Input:
40,123456-02,160,05/24/2012,02/13/1977, 10699.15,0
Output:... (5 Replies)
Discussion started by: Scottie1954
5 Replies
3. Shell Programming and Scripting
removing leading zeros for a decimal column in a file which has string & decimal values
,,,,,6630140,XXXXXXXXXXXXXXX, 0020.00,USA
,,,,,6630150,XXXXXXXXXXXXXXXL (xyz, 0010.00,USA
,,,,,6630150,XXXXXXXXXXXXXXX(xyz), 1300.00,USA
My file contains 9 columns. Out 9 columns, 8th column contains the... (9 Replies)
Discussion started by: marpadga18
9 Replies
4. Red Hat
Hello,
when i start to take backup following error generate please share solution for this problem i am very thankful to you.
$ tar -czvf orahome.tar.gz /testhome/TEST/PROD/orahome/
tar: Removing leading `/' from member names
O.S 4.5 Red Hat
Thanks,
Umair (1 Reply)
Discussion started by: umair
1 Replies
5. Shell Programming and Scripting
I have th following file
0000000011
0000000001
0000000231
0000000001
0000000022
noow when i run the following command
sed 's/^0+//g' file name
I receive the same output and the leading zeroes are not removed from the file . Please let me know how to achieve... (4 Replies)
Discussion started by: asalman.qazi
4 Replies
6. Shell Programming and Scripting
Hi All,
I am trying to replace the value of a xml tag with a new one. But, the existing value in the xml contain leading spaces and I tried to remove that with different sed commands but all in vain.
For replacing the value I wrote the command in BOLD letters below:
bash-3.00$... (3 Replies)
Discussion started by: khedu
3 Replies
7. Shell Programming and Scripting
hello everyone. I'm hoping someone can help me out here. I have 2 files. It looks like this:
File 1:
abc1, defg, 50.00, mno,990
abc2, cats, 100.00, pops,991
abc3, dogs, 1.00, treat,992
File 2:
990, airplanes, runway, doctor
991, jets, birds, much
990,... (13 Replies)
Discussion started by: crazyhpux
13 Replies
8. Shell Programming and Scripting
Hi All,
I have a file with the following contents with multiple lines
172445957| 000005911|8| 400 Peninsula Ave.#1551 | And,K |935172445957|000005911
607573888 |000098536 | 2|Ane, B |J |Ane |1868 |19861206|20090106|20071001
I want to trim the "leading and trailing spaces only" from... (2 Replies)
Discussion started by: kumar04
2 Replies
9. Shell Programming and Scripting
How do I remove or add leading zeroa from a variable. To make variable 10 characters long when adding zeros. (6 Replies)
Discussion started by: toshidas2000
6 Replies
10. UNIX for Dummies Questions & Answers
I am having xml document as below.
<transactionid>
00
</transactionid>
<tracknumber>
0
</tracknumber>
<key>
N/A
</key>
But the data contains leading and trailing spaces between the tags. Please let me know how can i remove these leading and trailing spaces between the tags.... (2 Replies)
Discussion started by: jhmr7
2 Replies
strtol(3C) strtol(3C)
NAME
strtol(), atol(), atoll(), atoi(), strtoul(), strtoll(), strtoull() - convert string to integer
SYNOPSIS
DESCRIPTION
or converts the character string pointed to by str to or representation, respectively. or converts the character string pointed to by str
to or representation, respectively. The string is scanned up to the first character inconsistent with the base. Leading "white-space"
characters (as defined by in ctype(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 string itself determines the base as follows: after an optional leading sign, a leading zero indicates octal conver-
sion; a leading or indicates hexadecimal conversion. Otherwise, decimal conversion is used.
If the value of ptr is not a pointer to the character terminating the scan is returned in the location pointed to by ptr. If no integer
can be formed, the location pointed to by ptr is set to str, and zero is returned.
is equivalent to
is equivalent to
is equivalent to
RETURN VALUE
Upon successful completion, all 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
returns or (according to the sign of the value), and sets to
returns and sets to
returns or (according to the sign of the value), 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
These interfaces were developed by OSF and HP.
SEE ALSO
ctype(3C), strtod(3C), strtoimax(3C), scanf(3S), thread_safety(5), glossary(9).
STANDARDS CONFORMANCE
strtol(3C)