Ubuntu :: Sort Command Gives Unsorted Results?

Jul 15, 2010

It sure looks not quite sorted to me. See lines 3 and 4.

Code:
altair/root /root 250# sort -k1 < files.out | head -6
/bin base-files
/bin bash
/bin/bash bash
/bin bsdutils

[Code]...

View 9 Replies


ADVERTISEMENT

General :: Saving The Results Of The Time Command While Discarding The Results Of The Command Being Timed

Apr 6, 2010

I'm timing how long it takes to run a command foo. I'm looking to append the results from the time command to a file, and discard the results from the foo command. I tried the following, but it didn't do what I want:

$ time ./foo > /dev/null >> output_from_time_command.txt

View 1 Replies View Related

General :: Sort Generates Unexpected Results

Jun 7, 2010

I sorted a large mailing list and the result is in almost sorted order, but not quite.The sort was invoked in the default manner, just "sort".See (below) a segment of the output file.(Note: the actual files have a street address following each name.I have omitted the addresses to avoid complaints about disclosing personal information on-line.) I expect all people named KATZ to be grouped together, but they aren't. This phenomenon occurs elsewhere in the output file, so it has nothing to do with surnames beginning with the character string KATZ.

View 5 Replies View Related

General :: Find And Sort Results By Date Modified

Jun 7, 2011

so I was wondering how I could do a simple find which would order the results by most recently modified. Here is the current fine I am using. (I am doing a shell escape in php, so that is the reasoning for the variables. find '$dir' -name '$str'* -print | head -10

How could I have this order the search by most recently modified. (Note I do not want it to sort 'after' the search, but rather find the results based on what was most recently modified)

View 4 Replies View Related

Programming :: Bash Shell Scripting / Using The Sort Command To Sort The Top 5 CPU Processes?

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

Programming :: SORT Command Versus Unix SORT

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

Ubuntu :: Can't See Results Of Job Scheduled With The 'at' Command

Oct 5, 2010

I scheduled a job, 'ls -a', with the at command, 3 minutes in the future. It looks like the job ran, but I cannot see the results of 'ls -a'. I accessed my mail with the 'mail' command and saw that the output of my scheduled job was message 1. I typed in '1' after the & prompt, and saw that the subject of the message was the output of my job, scheduled at the time specified with the 'at' command. I cannot see the output of the 'ls -a' command that I scheduled though. How do I see the contents of the message, and the actual output of the job.

View 1 Replies View Related

Ubuntu :: Different Results When Running In Command Prompt And Via Script?

May 26, 2010

i wonder if it is usual that the results of running commands via the command line is different from running them in a script file. my problem is that, i've to run 'modprobe -r e100' and 'modprobe e100' before suspend my machine via pmi in order to resume it properly. i wrote a script containg EXACTLY the same commands as i typed in the terminal/console but the result was not the same. the machine cannot be resumed as expected if i run the script file.

View 2 Replies View Related

Ubuntu Servers :: Shutdown Command Results In Lock Up

May 2, 2011

When I shutdown my server it seems to lock up. I use ssh for a headless unit and I can reboot fine, but I told it to shutdown and disconnected me and stopped logging (as far as I can tell) and then nothing. The lights stayed on and I had to press the power button. Is there a way to keep the logger running or to look someplace other then messages. I'm not great with logs.

View 8 Replies View Related

Programming :: TCL / Expect - IF Results Are Different Then Send A Command?

Dec 11, 2010

trying to see IF i dont get the right results repeat the command until it will or quit after 3 tries....

expect -exact "->"
send -- "test_read_register 0,0x37
"
if {! [regexp {Address 0x00000000} do send -- "test_read_register 0,0x37

[code]....

It should read

Read: Address 0x00000037, Data: 0x0000000b

but sometimes it comes out to this

Read: Address 0x00000000, Data: 0x00000000

therefore ill have to run the command again IF I Dont get the right results...

View 1 Replies View Related

Ubuntu :: Send The Results Of A Command Line $du -max-depth=1 To A Zenity Message Box?

Jun 14, 2010

I'm trying to send the results of a command line $du --max-depth=1 to a zenity message box.I want to create a .sh script that I can run as a Nautilus script that will open a zenity message box with a listing of sub-folders/sizes. $DU with options, will provide the results in a terminal window, but I can't seem to get it into a zenity message box. I've tried gxmessage also, but no go.

View 2 Replies View Related

General :: Tomcat - Why Does 'ls' Command Return Some Results In [squarebrackets].jar

Nov 25, 2010

Below is an example output of what I see when I run the 'ls' command on some directories in linux (this is from a tomcat/common/lib directory). However I'm not clear on why some of the filenames are appearing inside [square brackets]

-rw-r--r-- 1 root root 1038825 Aug 30 2006 [ant].jar
-rw-r--r-- 1 root root 566376 Apr 1 2008 [commons-collections].jar
-rw-r--r-- 1 root root 107392 Aug 18 2006 [commons-dbcp].jar

[code]...

View 2 Replies View Related

General :: Unix - Cat Command To Save Results Of Other Commands

Nov 26, 2010

This question may be silly and super easy for linux connaisseurs, but I was just wondering, for instance, I want to use the >find command to search for a file and send the results to a text file

View 5 Replies View Related

General :: Output To A Text File, The Results Of Compound Command?

Jul 28, 2010

How to output to a text file the compound command:

Code:
find -type f -print0 | xargs -0 grep -l "desired text"
I have not been able to find the answer.

[code]...

View 5 Replies View Related

General :: Include Command Results To Send To Admins Via Mail

Jul 16, 2010

how to include my command results in a script? Basically what the script does is it checks the status of a service within the linux server, then sends an email when done. I want to include the results of my status check to my mail when sent.

i.e.
service dhcp3-server status Status of DHCP server: dhcpd3 is running. <---this I want to include in the mail that is sent out via script.

View 6 Replies View Related

General :: Reusing Find Command Results In Mplayer Arguments?

Jan 22, 2010

I wanted to supply mplayer with the output of find command as arguments. The error returned showed spliced names of files whenever spaces occurred. I have subdirectories in my /home/my_user_name/Music/ directory, and in them multiple *.oga music files. The actual command that I issued was

Code:
mplayer $(find /home/my_user_name/Music/ -name "*.oga")

mplayer started but then was looking for broken file names. I am thinking quoting has to do with it to preserve the filename as one string but different attempts were met with inroads:

Code:
mplayer `find /home/my_user_name/Music/ -name "*.oga"`
gave me the same result and
Code:
mplayer `"find /home/my_user_name/Music/ -name *.oga"`

complained about wrong mplayer syntax.

View 1 Replies View Related

Software :: Top Command Version 3.2.6 Invalid Results Compared To CollectD?

Mar 11, 2011

I am trying to get the correct CPU usage using top. I ran collectD and I got different results.This especially happens when the CPU usage is close to 100%.Has anyone experienced having the top command report different results than other CPU usage utilities?

View 5 Replies View Related

Ubuntu Installation :: Results Of 'apt-get Update' Command Different Than Update Manager

Mar 24, 2011

I've run the command "sudo apt-get update" from terminal, showing no update to do.Then I've run the update manager (System-Administration-Update Manager) and it has shown an update (adobe flash).I thought that "apt-get update" command and update manager were the same... Why do I have different results ? Is something missing in my "sources.list" file ?

View 4 Replies View Related

General :: Command - What Does The 'sort' Parameters And Awk Do?

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

Ubuntu Servers :: Bash In 10.04 Server - Every Empty Line In The Script Results In "command Not Found"

Oct 8, 2010

Bash acts weird in 10.04 server. Whenever I try to run .sh scripts, every empty line in the script results in "command not found". Then on even simple scripts I get syntax errors, but the same exact scripts work on my 9.10 desktop installation. There's also another problem, I'm not really sure if it's bash-related. After setting the proxy using

[Code]...

View 5 Replies View Related

Programming :: Sort Of Execv Command Needed?

Jul 2, 2010

I have a problem, I need to launch another binary from my application, but I need to get the control back once the other binary is initialized. fork/exec doesn't seem to give anything on that side using pthreads I'm able to wait until the new thread exits, but that's not what I want at the moment I'm using popen, but it doesn't seem to do the job right...

View 14 Replies View Related

Fedora :: Bash Hangs When Command Not Found / Sort It?

Dec 9, 2009

I've been using linux for a long time, and I just ran into a problem that has me stumped. Any time I mistype a command, it says "Command not found."... yea, I know that's normal. But it doesn't return me to my # prompt. I have to press Ctrl+C to get back. code...

I know I do have one issue with this computer, I have 2 blown caps on my motherboard. This was a dual boot system, but after a virus with winblows, I decided to switch it to strictly linux. (roommates... *grumble*) I think I was running fc10 before I wiped the hd & installed fc12. Fc12 does seem to be running slower, and I still haven't got my sound card working properly... but that issue is for another topic...
-YungBlood Reborn

View 2 Replies View Related

Programming :: Can't Invoke A Command From Within Shell Script / Sort It?

May 17, 2010

When I try to invoke 'source' command from within a shell script, namely, myscript.sh, I get the following error message code...

View 1 Replies View Related

General :: Command To Sort A Text File By The Second Word?

May 14, 2010

What is the command to sort a text file by the second word?

View 4 Replies View Related

Programming :: Sort Command Output Differs When Encounters?

Mar 18, 2010

Here is what I am doing I have a file, a.txt for example, with following contents:

Code:
coreutils install
cpio install
cpp install
cpp-4.3 install
dbus install

[Code]...

So it seems like the sorting algo. for dpkg --get-selections is different than sorting algo. of 'sort' command when it encounters "-" (hyphen). How can I sort the original file (a.txt) in such a way that it produces the output file ,b.txt, exactly the same.

View 6 Replies View Related

General :: Use Sort Command For Its Ascending Order And Descending Order?

Aug 18, 2010

in my text file of 5 columns 2 column is in DDMMYYYY format. (ie DATE OF BIRTH). how to use sort command for its ascending order and descending order.

Is the same can be use for the date format YYYYMMDD ?

View 3 Replies View Related

Ubuntu :: Where Are Fsck Results?

Mar 3, 2010

I forced a fsck on the next boot by.Code: sudo touch /forcefsck.Where did the results go?/var/log/fsck/checkfs and /var/log/fsck/checkroot both read "(Nothing has been logged yet.)" Am I to assume that if there are no errors nothing is written to the log files?

View 9 Replies View Related

Ubuntu :: C++ Gives Different Results In Windows And 10.04 With G++?

Jun 2, 2010

I have compiled the same program and I get different results when the program is run in windows and in ubuntu, in windows I run it with Dev C++. I was wondering if someone could provide insight on this. My expected result is the one that Windows gives. However, I would really like to work in Ubuntu.

View 3 Replies View Related

Ubuntu :: General, How To Exec On Ls Results?

Feb 10, 2010

Find a file and need to do something to it, think there must be a single line solution for:

$ ls *.c
$ cat *.c

View 1 Replies View Related

Ubuntu :: Super + F Can't Find Any Results

Apr 30, 2011

So when I press Super + F I get "Search Files & Folders" but I don't get any results when I search for files/folders I know are in my home folder.

Am I missing something, do I need to install any other packages for this to work?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved