Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
File A
aa <space> --D--A--D---DDY---M--UM-M--MY
Another file
D3
M9
So output shud be
Here in FileA D which is 3 after removing dash
after we have counted dash D is position at 9
and for M is 23
final output will be
D9
M23 (2 Replies)
Hi,
I would like to add a new column containing the row numbers to a text file. How do I go about doing that? Thanks!
Example input:
A X
B Y
C D
Output:
A X 1
B Y 2
C D 3 (5 Replies)
Hi,
Trying to add a row of numbers. There are 24 number across. Would like to have column 25 sum each row.
10 3 45 49 0 24... Sum
3 200 3 9 1 3 ...... Sum
9 7 20 9 8 10 ...... Sum
Thank you. (5 Replies)
I have a spreadsheet of extremely long rows of numbers. I want to print only the last column. Tried using printf but there seems to be too many rows.
example:
3 100 34 7 23 0 8 ..... X
400 203 778 1 ..........Y
58 3 9 0 100 ..........Z
I only want to print X, Y and... (1 Reply)
the following is used to add numbers:
echo 7 47 47 44 4 3 3 3 3 3 | awk '{ for(i=1; i<=NF;i++) j+=$i; print j; j=0 }'
how do i multiply OR subtract a row of numbers using the above tactic? (8 Replies)
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)
Need help in coding:
File with several rows incl. numbers like
1 2 3 4
5 6 7 8
...
How can i build the sum of each row seperately?
10
26
...
Thx for help.
Please use CODE tags as required by forum rules! (13 Replies)
Hi,
i have a raw output file like this
167,63.50
167,63.50
168,63.68
166,63.68
168,63.68
I would like to add every each N rows (for example 60) and in a third column , a timestamp using the command date +"%H:%M"how can i do it with one single command ?
Thank you !! (5 Replies)