I'm a beginner in Unix, and would need some help from you guys!
My input (pipe delimited):
You can see that the first 3 lines have column 1 and 2 in common, same for lines 4 and 5.
I need to rearrange this table by putting together all the items (column 3) belonging to the same city.
Using awk, I would like to obtain something like that:
I managed to output the table like that:
But I cannot remove the duplicate in $1 and $2 to obtain what I want...
Any advice would be welcome !
---------- Post updated 10-04-12 at 12:34 AM ---------- Previous update was 09-04-12 at 09:41 PM ----------
I changed my strategy, and now I obtain this output:
So my question now is how can I insert a blank line between the last line beginning by "Ref." and the line beginning by "City" ?
As I have a variable number of lines with "Ref.", I cannot use stuff like
Last edited by beca123456; 04-10-2012 at 01:37 AM..
---------- Post updated at 03:04 AM ---------- Previous update was at 01:58 AM ----------
Just by curiosity (it can be useful maybe later)
With a layout like that:
How can I create an array to split the first bloc (i.e. from the first "City" to the 3rd "Ref."), in order to know the NR of the last "Ref." in each block?
Last edited by beca123456; 04-10-2012 at 05:22 AM..
Bootstrap is great; but we have had some issues with Bootstrapped <tables> (and legacy <fieldset> elements) showing annoying, wayward lines. I solved that problem today with this simple jQuery in the footer:
<script>
$(function(){
$('tr, td, fieldset,... (0 Replies)
just discover this thread. It sounds perfect for me because I am following an online course on command line tools and some instruction ... seems not be replicable on my Terminal
Here is an example on a txt file with n rows each containing 3 word separated by a space.
a b c
d e f
....
... (5 Replies)
hi,
i need to copy one table with data into another table,
right now am using
create table table1 as select * from table2
i want the constraints of table1 to be copied to table2 also , can anyone give me some solution to copy the constraints also, now am using oracle 10.2.0.3.0... (1 Reply)
I am new to this shell scripting....
I have a file which contains list of users. This files get updated when new user comes into the system.
I want to create script which will give a table containing unique list of users. When I say unique, it means script should match table while parsing... (3 Replies)
Hi there,
I am with this one column input text file to change layout, please help. Thanks. I have awk, sed.
$ cat input
Median
1.0
2.3
3.0
Median
35.0
26.3
45.7
10.1
63.1
Median
1.2
2.3 (8 Replies)
Hello,
I'm working with putty on Windows 7 professional and I'd like to know if there's a way to gather specific lines from a pre-existing table and make a new table with that information.
More specifically, I'd like the program to look at a specific column, say column N, and see if any of the... (5 Replies)
hi there, I am trying to create a stored procedure that i can pass the table name to and it will create a table with that name. but for some reason it creates with what i have defined as the variable name . In the case of the example below it creates a table called 'tname'
for example
... (6 Replies)
Hi
I am having three oracle databases running in three different machine. their ip address is different. from one of the DB am able to access both the databases.(means am able to select values and insert values in to tables individually.)
I need to fetch some data from DB1 table(say DB1 ip is... (2 Replies)
Hi
I have Fedora linux with XFCE desktop. I want to use Indic lanquage in that. I have installed unicode devnagri fonts. But I am not able to change my default keyboard layout. How can I change default keyboard layout in XFCE or through command line.
Thanks
NeeleshG (0 Replies)
Hi,
How do i go about changing the keyboard layout to the UK layout.
currently the @ symbol on the keyboard appears as a " sybol on the monitor.
Many Thanks in advance
Kam (1 Reply)