Search Results

Search: Posts Made By: reeta_shri
9,578
Posted By reeta_shri
Add trailing zero in a number
how to add a trailing zero in a number?
For example:
Input- 00000734560
output- 000007345600

Thanks in advance.
2,455
Posted By reeta_shri
$4 is floating values like 216.00, 1984.00 etc
$4 is floating values like 216.00, 1984.00 etc
2,455
Posted By reeta_shri
Printf statement
The printf statement

pay_amount=$(printf "%013.3f" "$4")


working perfectly at one path(xxx/home/rsh) and showing error (printf: 216.000: invalid number) at another path(/opt/xxxx/xxxx)....
1,954
Posted By reeta_shri
Yes, this works just like my previous...
Yes, this works just like my previous command...but there is a SPACE introduced btw the joined lines. Is there an option to avoid it.

example:
line 1: aaaaaaaaaa
line 2: bbbbbbbbbb
line 3:...
1,954
Posted By reeta_shri
Concatenation of a line to previous line
I need to concatenate all lines of a file into 1 line.
input file containing lines like

001123456400001234563 107 001578000000000000000000000000000000000000 0000000021600
001123456912345600003...
12,333
Posted By reeta_shri
Thanks for the quick reply. But i am passing...
Thanks for the quick reply.
But i am passing these values to a function and there i used the awk command mentioned by you(pay_amount=`awk '{printf "%013.3f\n" ,$1}'$4 `) ,its showing
awk: syntax...
12,333
Posted By reeta_shri
Add leading zeros in floating point variable
I need to add leading zeros in a floating point numbers.
The length of the number should be 13 including decimal.
The input number is changing so number of leading zeros is not fix.

For example...
8,260
Posted By reeta_shri
sample outout will be 0001256457558 ...
sample outout will be

0001256457558
001644855855960790
002494850496568568

starting 000,001 and 002 is fixed and rest data is variable and 485585 coming from the input file.

my whole...
8,260
Posted By reeta_shri
thanks for the reply input file like: ...
thanks for the reply

input file like:
10014526728998900
20097627893409458908890890485
30977874018348558583834089497876974994
319739759085094890589088498979787020923908...
8,260
Posted By reeta_shri
File handling in bash shell scripting
i am new to shell scripting and stuck at one place in my program.

i am reading data from one structured file and extracting some data from particular lines and then writing into the output file....
Showing results 1 to 10 of 10

 
All times are GMT -4. The time now is 06:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy