hi...
i want to extract single row from a file at a time and i don't want to specify which row to be extracted in the command.
i mean i want to use a loop, so that i will fetch all the rows one after the another.
i used sed -n '$count p' filename
but this is not working.
please give me the... (2 Replies)
Hello Everyone,
i have quick question.
I have file names like: bin_map300.asc and I would like to extract grid300.
My approach so far:
name=bin_map300.asc
echo ${name%%.*}
echo ${name##*_}
I am stuck combining the two.
Any help would be appreciated. (3 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)
is there another way of doing the below:
echo "7 3 8 2 2 1 3 83.4 8.2 4 8 73 90.5" | bc
shell is bash. os is linux and sunos.
bc seems to have an issue with long range of numbers (12 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)
Hi I am part of a academic organization and I want to send a fax to the students however there must be a quicker way to get the fax numbers extracted from the online forms they sent me.
The file looks like this (numbers are fake in order to protect identity):
Biochemistry Major
Michael... (3 Replies)
I am extracting a number of key/value pairs in awk using following:
awk '
/xyz_session_id/ {
n=index($0,"xyz_session_id");
id=substr($0,n+15,25);
a=$4;
}
END{
for (ix in a) { print a }
}'
I don't like this Index + substr with manually calculated... (5 Replies)
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)
In a huge log file (43MB, 43k lines) I am trying to extract data between two tag pairs on same line and export it to a file so I can pull it into Excel for a report.
One Pair is <Text>data I need</Text>
Other pair follows on same line and is <TimeStamp>more data I need</TimeStamp>
I would need... (2 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)