10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
I've got this problem where I need to add two array in shell script such that that is an element is greater than 9 then it get further split into individual digit, something like below :
Input :-
array1=(2 6 8 9 10 12)
array2=(5 4 6 8 12 14)
Output :-
array3=(7 1 0 1 4 1 7 2 2... (8 Replies)
Discussion started by: mukulverma2408
8 Replies
2. Shell Programming and Scripting
Hi again. Sorry for all the questions — I've tried to do all this myself but I'm just not good enough yet, and the help I've received so far from bartus11 has been absolutely invaluable. Hopefully this will be the last bit of file manipulation I need to do.
I have a file which is formatted as... (4 Replies)
Discussion started by: crunchgargoyle
4 Replies
3. Shell Programming and Scripting
Hi,
Below is my input file:
Long list of significant figure
1.757E-4
7.51E-3
5.634E-5
.
.
.
Desired output file:
0.0001757
0.00751
0.00005634
.
.
. (10 Replies)
Discussion started by: perl_beginner
10 Replies
4. Shell Programming and Scripting
I have a file which has following contents which I want to add up.
28170.24
28170.24
28170.24
28170.24
28170.24
28170.24
28170.24
28170.24
28170.24
28170.24
28170.24
28170.24
28170.24
28170.24
139038.72
139038.72
139038.72
139038.72 (5 Replies)
Discussion started by: aksijain
5 Replies
5. Shell Programming and Scripting
I am writing a bash script on ubuntu11.10
I have some string having numbers and letter and want to add all the numbers together
For example
1s2d23f
I want to perform
1 + 2 + 23 and store it in a variable (3 Replies)
Discussion started by: kristinu
3 Replies
6. Shell Programming and Scripting
Hi!
I need the following script:
- All numbers in a filename (0-9) have to be replace by a String ("Zero"-"Nine")
- The script has to go through all the files in the current directory and has to replace the numbers as described above...
I have no idea how to do this...
Thanks!
Michael (5 Replies)
Discussion started by: Michi21609
5 Replies
7. Shell Programming and Scripting
Hello All,
I have 3 types of files. The names of which starts with P,I,M
like P*********
D*********
M*********
now I need to do some operations witht hese files..
so
if file name starts with P or p
then
do the operation for P file...
fi
else (20 Replies)
Discussion started by: smarty86
20 Replies
8. Shell Programming and Scripting
I want to add options to my shell script but having problems, my code so far is;
#!/bin/bash
lflag=
iflag=
while getopts 'l:i:' OPTION
do
case $OPTION in
l) lflag=1
lval="$OPTARG"
;;... (1 Reply)
Discussion started by: paulobrad
1 Replies
9. Shell Programming and Scripting
cat dailyreports | grep "Important list" | awk -F":" '{print $2}' | awk -F" " '{print $1}'
hey guys, after running the above combination of cat and awk, i get the below output:
3
4
2
9
now, i need to add these numbers up all in one line. i dont know what to add to that cat and awk one... (2 Replies)
Discussion started by: Terrible
2 Replies
10. Shell Programming and Scripting
I would like to write a script with BASH to add two numbers (integer) and write the result to the standard output. Please help! (7 Replies)
Discussion started by: Viper01
7 Replies