I tried to sort these number with Unix sort, but it doesn't seem to work:
2e-13
1e-91
2e-13
1e-104
3e-19
9e-99
This is my command:
sort -nr file.txt
What's the right way to do it?
I did some searching but I cannot find documentation on how unix usage works. I know somethings (mostly through trial and error) but for example how do I know that:
/usr/bin/ls [-aAbcCdeEfFghHilLmnopqrRstuvVx1@] [file]...
Means that you can include more than one option. Ie:
ls -la
Can someone point me to some documentation on what the usage syntax is.
I have a string and I need to find out whether it is a unix timestamp or not, how can I do that effectively?
I found this thread via Google, but it doesn't come up with a very solid answer, I'm afraid. (And yes, I cribbed the question from the original poster on the aforementioned thread).
http://www.sitepoint.com/forums/showthread.php?t=585963
Unix configuration files come in all shapes and forms. I know that Webmin has a Perl API that makes it easy to parse and modify most common configuration pro grammatically, while preserving changes that might have been made by hand.
Are there any other libraries that has similar functionality, perhaps for other languages (Python, Ruby, C, C++, etc)?
is it bad to output many files to the same directory in unix/linux? I run thousands of jobs on a cluster and each outputs a file, to one directory. The upper bound here is around ~50,000 files. Can IO be limited in speed in light of this? If so, does the problem go away with a nested directory structure?
Thanks.
I bash, how do I convert dos/windows newlines to unix? It must be non-interactive, not like starting vi and typing something in, but a command on the command line that can be put in a script file. The dos2unix and unix2dos commands are not available on the system.
How do I do this with commands like sed/awk/tr?
I'm using SSRS 2005 and I need to convert time from a serial unix time like 3412.254263 to a duration like 166:12:35 where the second format is HH:MM:SS.
All .NET code should work, but I can't find any function that does not include the date or does not treat the result as a duration.
Any help would be appreciated!
Hi,
I'm using Windows and I would like to do extract certain columns from text file using Perl, Python, batch etc. one liner.
On Unix I could do this:
cut -d " " -f 1-3 <my file>
How can I do this on Windows?
I have a problem with Putty (a terminal emulation program) After connecting to my unix box from putty Bash completion does not seem to work .
does anyone know a plugin that can help me or another terminal emulator that can achieve these feat.
Is there a way to use unix date to print the number of seconds since epoch?
I'm open to using other standard shell commands if there is a way
(I'm using Solaris, so there isn't date "+"%s")
Thanks
I have a tool that generates tests and predicts the output. The idea is that if I have a failure I can compare the prediction to the actual output and see where they diverged. The problem is the actual output contains some lines twice, which confuses diff. I want to remove the duplicates, so that I can compare them easily. Basically, something like sort -u but without the sorting.
Is there any unix commandline tool that can do this?
Hi all,
I'm dealing with a large amount (30,000) files of about 10MB in size. Some of them (I estimate 2%) are actually duplicated, and I need to keep only a copy for every duplicated pair (or triplet).
Would you suggest me an efficient way to do that? I'm working on unix.
Thank you :-)
The Component Object Model (COM) is (or was...) the way in Windows to provide language-neutral software components.
There is any programming model in Linux/UNIX with the same philosophy of code reuse through binary components?
In a UNIX shell script, what can I use to convert decimal numbers into hexadecimal? I thought od would do the trick, but it's not realizing I'm feeding it ASCII representations of numbers.
printf? Gross! Using it for now, but what else is available? :)
The following UNIX one-liner looks for Python files below the CWD and adds them to a TAGS file for Emacs (or we could do the same with Ctags).
find . -name *.py -print | xargs etags
This breaks if the CWD has a space or other unusual character in its name. -print0 or -ls don't seem to help, in spite of what man find says. Is there a neat way around this?
I need to "construct" .NET DateTime values in Python/C++.
How can I compute the number of ticks stored by DateTime starting from a UNIX timestamp?
A solution involving Win32 API calls it's ok (I believe FILETIME functions could help).
I am currently get access to a cluster of Unix machines, but they don't have the software I need (numpy, scipy, matplotlib, etc), and I have to install them by myself (I don't have the root permission, either, so commands like apt-get or yast doesn't work).
In the worst case, I have to compile them all from source. Is there any better way to do so? I hear something about Enthought Python and Sage, but not sure what is the best way to do so.
Any suggestion?
I'm looking for a Windows port of the UNIX touch command. I don't want to install an entire MKS toolkit just for the one tool. Is there a native port available somewhere or a command in Windows that does the same thing and supports features like all files in a directory by wildcard?
Specifically I'm after changing mtime, ctime and atime for a project that reports ages of files based on... mtime, ctime and atime.
Hi,
Can anybody tell me the 'call out table' in unix? The explanation is given in 'Maurice J. Bach' book but I'm getting difficulty in understanding the example especially, the one explaining the reason of negative time out fields. For what purpose the software interrupts are used there?
Thanks!
In The Unix Programming Environment by K & P, it is written that
" The programs in a pipeline actually run at the same time, not one after another.
This means that programs in a pipeline can be interactive;"
How can programs run at same time?
For ex: $ who | grep mary | wc -l
How grep mary will be executed until who is run or how wc -l will be executed until it
knows results of previous programs?
I have a web application deployed on a jboss server running on a unix machine.
I want to be able to monitor threads, CPU times ,requests, etc. , for gauging application performance on the server.
What might be the best way to do this?