I need to create an out put file, last two columns as a row of data (using the first columns as heading) with the file name as first row. For an example the out put file should look like; system_name,0900_in,1000_in,1100_in,1200_in,1300_in,1400_in,0900_out,1000_out,1100_out,1200_out,1300 _out,1400_out
system1,15,17,19,21,23,25,24,26,28,30,32,34
I need to run a script to do above conversion. Need your help.
I bet this is a Perl one-liner (or very simple python script).I have a tab separated files in which each row looks like:Unique_Eight_Character_Sequence [3 tabs] data1~moredata1~moredata1 [3 tabs] data2~ moredata2~ moredata2 ... dataN~.The output file should have each column converted into a row (with the unique character sequence copied in for the first column), and then each "~" replaced by a comma.
I have been messing with a2ps in order to print a text file I have that has 130 columns by 80 rows per page. It appears that a2ps automatically scales the number of rows based upon the number of columns I try to print.The file prints properly for the columns but a2ps scales the rows to be 97 rows per page. So the 80 rows print but the next 17 rows are blank. It is not scaling the font for for 80 rows.
I've been hitting my head against a wall for awhile with this one:As the last part of some data analysis I performing I would to construct a matrix from a series of different files. These files have the format:
In linux terminal; how can we get the number of rows ad columns from linux kernel? I tried from environment variables(LINES,COLUMNS) but, I could not retrieve them as my editor program is a child process to linux terminal process.
if there's a tab-delimited file under /usr/desktop, how can I determine the number of rows and columns of the file in shell?And, if told the the 3rd column of the file contains only numerical values and all values in the 5th column are unique, how can I verify these in shell?
I have a problem - I have files with rows of data and I need to check if the next row (of the same type) has the NEXT date in it so I need to extract a date in YYYYMMDD format from a row (easy enough) then add one day to it and compare it to the the next date I encounter on a subsequent row.
i am trying to get a script that i'm calling to have information from a sql populate into rows... but i'm not getting the data to output correctly into the rows. can someone please help?
I am trying to generic way to convert the string datatype to other primitive data type. To achieve, i used Template . But i getting error and couldn't resolve the issue and error reported is also clueless.
How to easily convert to/from plain machine-readable HEX (without anpaddings/offsets/character view) with xdd or hexdump?I'm tired of digging of some special format strings (and finding out that it suddenly starts wrapping lines after N characters or skip lines) or writing Perl oneliners every time.Why is it not as simple as base64/base64 -d?
Can anyone please suggest me how can we convert a wide char data in linux which is of 32 bit to a 16bit data. I have a file which has 16bit binary data? Could any one please give me ideas.
I have 2 external drives that I'm using for movies and they're both formatted to fat32. The problem I'm experiencing now is that some of the high quality mkv files are not able to be moved to the drive because of fat32's limitations.
I'd like to convert to ext3 (or 4) and I wanted to check to see if I can do it without having to reformat and without loss of data.
i 've been using fedora 14,15 for like few months and i still have a 4GB NTFS partition win XP pro.i have installed fedora in about like 20gb for root and home ext4.i rarely use win xp nowadays (once in a week) considering i was using windows for like years.i have a commondata partition of about 130GB NTFS.i now dont want to use the windows and i want to convert the 130GB NTFS to ext4, but i am worried that if somehow at some point i crash my partition tables and i was using ext4 i wouldn't be able to recover the data as easily as i would in a windows.i want to know whether there is a reliable ext4 data recovery tool for fedora?igoogled and i found this link .. if any of you guys have used these tools can you share the experiences ?Mondo RescueTestDisk safecopy PhotoRecddrescue
Select count(*) from stocks2.historical where close*1.05 < (select open from stocks2.historical where date = date_add(date,interval 1 day)) and year(date)=2010;
The problem is with the "date" in bold... i want that date to be the date of the previous row. is there a way to do that purely with mysql? (naturally, i can write a script to go through and compare each date; what i'm asking for is a mysql solution.)
Does anyone have a solution for merging files if the number of rows in the two (or more) files is non-equivalent.To exemplify, how about merging the following 3 files:
We're currently running a web site on CentOS 5.5 running Apache - Tomcat - Mysql. A part of the web site runs slowly or it would appear to be.
The part in question returns records from mysql about approx 200 - 400 rows of data.
The first point of call was the SQL database we've managed to fine tune this. The problem I have is with IE7 and IE8 when I run Firefox or IE6 SP2 the rows return in about 9 seconds. I use IE7 or IE8 and it takes about 20 - 25 seconds.
I have Ubuntu 9.04 and just installed Sound Converter. I am trying to convert a bunch of .ogg files to mp3 to play on my iPod and it's not working so well. In the Sound Converter options I have is set to convert to high quality mp3. I choose the folder that the files are in and after a moment (slow laptop) Sound Converter populates, I hit 'convert' and it shows that the conversion completes in two seconds. All that it did was create the new folder structure of artist/album but there is nothing in there. Not sure what I am missing. I used Sound Converter before and it worked fine.
When you view mail in evolution in the vertical mode with the folders on the left, then the mail list in the middle and the message on the right, the mail list displays each message on two rows. But in thunderbird, the mail list is just in one row which means that much of the message header is not visible.
how to get thunderbird to display message lists using two rows per message?
I have been trying to repeat the first two rows in a Calc document but I keep getting an error.
Here are the instructions that I used.
Printing Rows or Columns on Every Page If you have a sheet that is so large that it will be printed multiple pages, you can set up rows or columns to repeat on each printed page. As an example, If you want to print the top two rows of the sheet as well as the first column (A)on all pages, do the following:
1.Choose Format - Print Ranges - Edit. The Edit Print Ranges dialog appears.
2.Click the icon at the far right of the Rows to repeat area. The dialog shrinks so that you can see more of the sheet.
3.Select the first two rows and, for this example, click cell A1 and drag to A2. In the shrunk dialog you will see $1:$2. Rows 1 and 2 are now rows to repeat.
4.Click the icon at the far right of the Rows to repeat area. The dialog is restored again.
5.If you also want column A as a column to repeat, click the icon at the far right of the Columns to repeat area.
6.Click column A (not in the column header).
7.Click the icon again at the far right of the Columns to repeat area.
Rows to repeat are rows from the sheet. You can define headers and footers to be printed on each print page independently of this in Format - Page.
When Debian 6 (amd 64, testing) is loaded, before desktop appears, for a while, the screen is black and three strange green rows appear. Then, all is ok and I can see a normale desktop and start to use Debian. So, an error in video config could be possible. Linked to this fact (I think) , there is the impossibility to modify the resolution screen (that is fixed to 1024x768) and the refresh frequency. I've tried to find "xorg.conf" in order to modify it like various guides suggest me, but this file is not present.
I have a lot of files with thousands of rows and usually two columns of data. Column 1 is a coordinate, column 2 is a score. I want to delete rows that have a value in column 2 over, in this case, 50.