10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
Ich have a list as follows
73
5
100
45
81
4
and I would like to have an output (on screen) like that
73
5
100
45
81
4 (6 Replies)
Discussion started by: lazybaer
6 Replies
2. Shell Programming and Scripting
Hello.
I'm trying to add multiple numbers with varying length and with leading zeroes in it. However, I'm getting the sum (totalHashAccountNumber) without the leading zeroes in it. How do I retain the leading zeroes?
Please pardon the lengthy code.. I'm getting the hash account number from 2... (2 Replies)
Discussion started by: udelalv
2 Replies
3. UNIX for Dummies Questions & Answers
Hello Gurus,
Quick question. I have a file with the following records:
A~000000000000518000~SLP ~99991231~20090701~88.50~USD~CS~
A~000000000000518000~SLP ~99991231~20090701~102.00~USD~CS~
A~000000000000772000~SLP ~99991231~20100701~118.08~USD~CS~
I wold like to do the following:
1. Add... (1 Reply)
Discussion started by: chumsky
1 Replies
4. Shell Programming and Scripting
hi All
i am new to linux...
source txt ..
281-BUM-5M BUM-5M 0 0
282-BUM-5M BUM-5M 0 0
83-BUM-5M BUM-5M 0 0
is it possible to use bash script to convert to
(remove the "-" and fill up to 4 digit" ?
0281 BUM-5M BUM-5M 0 0
0282 BUM-5M BUM-5M 0 0
0083 BUM-5M BUM-5M 0 0
thanks a ... (5 Replies)
Discussion started by: samoptimus
5 Replies
5. Shell Programming and Scripting
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
input output
216.000 000000216.000
1345.000 000001345.000
22345.500 ... (4 Replies)
Discussion started by: reeta_shri
4 Replies
6. Shell Programming and Scripting
Hi,
Can anyone help me how to add leading zero's (0's) infront of numbers in unix script.
For more details.
x=450
Y=2344
i want the out put of 00000450, 000002344 (leading 5 zeros)
Thanks
A. Raj. (8 Replies)
Discussion started by: easterraj
8 Replies
7. Shell Programming and Scripting
Hello, I am (trying) to write a script that will check to see how many users are logged on to my machine, and if that number is more than 60 I need to kill off all the oldest sessions that are over 60. So far I have been able to check how many users are on and now I am at the part where I have to... (3 Replies)
Discussion started by: raidzero
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I do have a code as follows:
function deHex {
if ]; then
deHexDate=${1:1:$2}
fi
}
The description given for the above code is as follows:
# description: removes leading zero so value will not be recognized as hex
# usage: deHex <value_parameter> <value_input_length>
... (0 Replies)
Discussion started by: risshanth
0 Replies
9. Shell Programming and Scripting
How to insert leading zeros into a left-justisfied zip code?
e.g. Zip code is written as 60320 which is left-justified to make it be read as 0060320.
We have to move it to right-justifiable then insert 2 leading zeros into it... ;) (1 Reply)
Discussion started by: wtofu
1 Replies
10. Shell Programming and Scripting
I'm trying to write a script that compare's some numeric values in a file, but in one of the files the value always has leading zero's. For example -
temp_8719_LM344_20031216091826: printera : 552 : 276 : 552 : 276
temp_8719_LM344_20031216091826: printera : 000552 :000276 : 000552 : 000276
... (5 Replies)
Discussion started by: dbrundrett
5 Replies