General :: Sort A Data According To A Given Criteria?
Dec 19, 2010
I'm struck with the following problem.
I have a data file with following data code...
(I have bigger data that needs to check all the above conditions)
get a code for the above problem
(either a shell code or a c-program)
View 2 Replies
ADVERTISEMENT
Jun 11, 2011
For Linux command sort, how do I force sort to load all input into memory and sort assuming I have enough memory? Or is it best to use a RAMDISK to store the input before feeding it to sort?
View 3 Replies
View Related
Mar 21, 2011
I have an ASCII file containing 3 Columns of descending data as flollows:
3277.233 | 9.032167E-16 | 5.354040E-16
3276.725 | 1.825813E-15 | 7.552098E-16
3276.211| 2.472245E-15 | 8.826818E-16
3275.699| 2.943001E-16 | 3.192112E-16
[Code]....
I want to sort them in ascending order.
Does anybody know how to do it in Ubuntu 10.4.
View 5 Replies
View Related
Jan 27, 2011
I am having a file filled of blocks like (each is seperated with the <event> )
<event>
8 1 0.1118800E-04 0.1709000E+03 0.7546772E-02 0.1182204E+00
-1 -1 0 0 0 501 0.00000000000E+00 0.00000000000E+00 0.40846782627E+02 0.40846782627E+02 0.00000000000E+00 0. 1.
2 -1 0 0 501 0 0.00000000000E+00 0.00000000000E+00 -0.90202563950E+03 0.90202563950E+03 0.00000000000E+00 0. -1.
[code]....
how can I copy this block if for example find "13" in the first column and "-1" in the last ? Then, looping to the rest of the file doing the same all over again?
View 14 Replies
View Related
Jul 6, 2010
I have a few FTP users on my linux server(running vsftpd). They all have their own directory and can upload and delete files in that folder.Now, I was wondering whether it would be possible to create special permissions/rights for users. For example, I would like to make it so that certain users could not upload .exe files, or I want a certain user to only be able to upload image files (gif, jpg).
View 2 Replies
View Related
Sep 11, 2009
I have several files with many lines something like this:
I'm trying to write a script that will count the number of characters per line that doesn't contain a ">" symbol and give me an average of those values. I have most of the script together but I can't figure out how to connect some of the steps.
Code:
View 3 Replies
View Related
Sep 28, 2010
I have very little linux experience. And need some help with a bash script. I need to a script I can set cron to run to sort files out of a holding folder into final folders. It doesn't necessarily have to be bash, but I think it would be sufficient for this. File names are formatted as such when created: Dest-Date-Time-CID-Destination# I want the files to be moved from a all in one holding folder to a folder structure like this.
.../storage/year/month/day/Destination#/VarX(type)/hour/CID/'File'
I would need an if/else if/else statement to say if Dest = A set VarX = B If for example the file name was
infinity-20100927-17:00-1112223333-4445556666.wav
I would like the above file to end up moved from
.../holding
to
.../storage/2010/09/27/4445556666/Inbound/17/1112223333/infinity-20100927-17:00-1112223333-4445556666.wav
So the script will need to make directories based on information in the file name which is delimited by single dashes. Then move files from the holding folder to the newly created "sorted" folders.
View 15 Replies
View Related
Jun 21, 2011
I'm here of course because I would like to know what would be the SSH command to issue if I need to delete certain files that meet certain criteria. For instance, in this case, I simply have files that almost bear the same name but still have some very minor differences.
Let me give you an example:
L0619000.log
L0619001.log
L0619002.log
L0619003.log
L0619004.log
Those in bold are those I'd like to have removed, while the "L0619004.log" is obviously to be left intact.
View 3 Replies
View Related
Jul 14, 2010
A few months ago I have setup a server with three hard disks. The partition mapping the disks as follows:
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x7ca36fee
[code]....
Now I have the following problem the LVM file system don't mount properly.If I open the mount point I see only a few files of the LVM disk. If I want to unmount the disk I get the following error:
umount /data/
umount: /data/: not mounted
If I want to mount the volume I get the following error:
mount -a
mount: /dev/mapper/gegevens-Data already mounted or /data busy
View 3 Replies
View Related
Dec 8, 2009
The most recent flavour of Linux I've been using has been Sidux, but the update cycle in sid is a little too fast for my liking.
What I'm looking for:
- Debian Based
- KDE 4.X
- Ideally it would still be able to use debian archives (ie like sidux)
- Updates less often than sid, so you aren't a long way behind if you miss a week, but often enough to still have up to date versions of software.
View 9 Replies
View Related
Feb 28, 2010
What options should I use when I'm using the sort command to sort the top 5 CPU processes (ps -eo user,pid,ppid,%cpu,%mem,fname | sort ??? | head -5) showing max to min usage?
View 2 Replies
View Related
May 4, 2010
We switched from unix to linux and we have an old report that extracted data from a database, output to an ascii file and then sorted the results in the file based on different arguments. The report now blows up when it runs,and I can only guess it is because the options for sort on linux differ slightly from unix.For example, here is one of the commands issued from within the report app that ran on the old unix box:
if sort-sequence = "descending" then
'sort -t~" -f +3.0f -4.0 +5.0r -6.0 -f '
else
'sort -t~" +3.0f -4.0 +1.0f -2.0 -f'
I will eventually rewrite the report to store the data in a local table, but I can simply adjust the options to suit the requirments of linux. Basically, I need to know if this can be a quick fix for the short term.
View 2 Replies
View Related
Aug 8, 2011
Currently we have migrated data from Unix linux. The data in Unix is in Big endian byte structure. Where are as Linux (suse linux) byte structure us little endian. This byte order mismatch is creating problem when data is read again in microfocus cobol.
Is there any way to set byte order in Linux is big endian?
Is there any utility to convert data in big endian byte structure to little endian byte order.
View 4 Replies
View Related
Sep 11, 2011
The GNU sort text utility features a non-standard -R option to randomize input lines (presumably by sorting on a hash).
OSX sort does not have this extension. Is there similar functionality available in another text filter?
View 1 Replies
View Related
Jun 28, 2011
I am using expect command to pass password to my script.
like code...
it will send password properly, but after that it will not come out of expect to bash.
View 4 Replies
View Related
Mar 5, 2010
I was not able to install svn on Fedora 9, it gives a warning APR not found. Which svn version would be compatible?
View 2 Replies
View Related
May 14, 2010
How can I list directories with ls and sort them by their owner and group?
View 1 Replies
View Related
Aug 20, 2010
The sort utility in Ubuntu 10.04 (Lucid) always sort by case-insensitive, just like if you specify --ignore-case to it. The two sort just give the same result:
[Code]....
But sometimes I want to sort by case-sensitive, so the upper-case letters come first, then lower-case letter.
View 2 Replies
View Related
Apr 27, 2011
How can you make htop sort the list of processes by PID?
View 2 Replies
View Related
Oct 1, 2009
I am using Red hat linux .. i just wanted to know, is it possible to arrange or sort filenames numerically?i have saved several files with the follwing names : 1.png, 2.png, 3.png, 4.png ...... 11.png 12.png. and so on.... but the containing folder sorts this alphabetically in the following manner 11,12,13...... 1, 2, 3, and so on...
View 6 Replies
View Related
Apr 6, 2010
How to configure yum in centos.
its easily possible in rhel 5.0
View 3 Replies
View Related
Mar 12, 2010
I've been using Linux Mint happily for a while until a couple of days ago it just died. Froze up, nothing I could do would free it up other than a hard reset. So, I tried to install it again from a Live CD, but my laptop won't even boot into Live mode. It just sits there, saying 'Loading....'. which it frankly isn't. I suspect a major hardware fault has occurred, but have no idea what. Any ideas?
View 1 Replies
View Related
Feb 22, 2010
I am getting little bit difficult in sorting the date ranges which are in a field like:
How make a sort as per the Month and date , i mean result should be as per the month and date wise. If i go for the sort -M , i am not able to get the list as per date of the particular month.
View 4 Replies
View Related
Mar 30, 2010
How do I sort the output of du by its first column. I issue the command this way:$ du.Is there a way?
View 5 Replies
View Related
Feb 1, 2011
I am using Ubuntu 10.10 maverick meekat...suddenly terminal cannot be launched.
View 8 Replies
View Related
Feb 18, 2011
I have this file with the first lines as follows:
a
a
ability
able
[code]....
say the file is named file1.txt After i do the following:
sort file1.txt | uniq >> file2.txt
I expect that letter a would only appear once, not in two rows, word about would also appear only once. However, I can't seem to get that result using this. I also tried the sort -f file1.txt | uniq >> file2.txt but to no avail. I actually got file1.txt from a messier file using the -f option in sort command.
View 2 Replies
View Related
Dec 21, 2010
I am reading a tool manual and it instructs to use such a command:
Code:
Especially, what does the 'sort' parameters and awk do?
View 8 Replies
View Related
Feb 3, 2010
In my CentOS 5.4 installation i configure it as a server GUI and click the updates box and go to the configure now option and click the internet box but it just says getting packages or something like that and i never does.
View 6 Replies
View Related
Dec 1, 2009
I am using fedora9 os
when i logging to gnome in root user
then gnome desktop does not display ,it is white screen
i viewed log messages the message is
Resolved address "xml:readwrite:/root/.gconf" to a writable configuration source at position 0
View 2 Replies
View Related
Jan 7, 2010
I just started using ubuntu karmic on an ibm x60
with comcast. I tried setting up evolution with a
mobile me imap account and can receive mail no problem
but cannot send mail. Any suggestions or remedies?
View 4 Replies
View Related