commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
sorts the contents of a file without the need for a second file to take the sorted output.
This was previously entered as `sort -g list.txt -o $_` but as others have pointed out the $_ references the previous command. so this would've worked had that been the second part of a command joined with && like:
cat list.txt && sort -g list.txt -o $_
The user below me Robin had the most correct command.
There is 1 alternative - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.