[Fish-users] equivalent for watch command

2013-09-17 Thread Martin Bähr
hi, i am trying to convert the following watch command to fish: watch (for i in *; do du -h \\$i\; done| tail -20 | cut -c -\$((\$COLUMNS-5))) actually, the problem i really wanted to solve is to change the order in which the files are processed. bash expands * alphabetically, and because the

Re: [Fish-users] equivalent for watch command

2013-09-17 Thread Andrew Kreps
If I'm reading that right, you're trying to get a list of your top 20 largest folders? What does 'watch' do? On Tue, Sep 17, 2013 at 9:47 AM, Martin Bähr mba...@email.archlab.tuwien.ac.at wrote: hi, i am trying to convert the following watch command to fish: watch (for i in *; do du -h

Re: [Fish-users] equivalent for watch command

2013-09-17 Thread Martin Bähr
On Tue, Sep 17, 2013 at 10:58:15AM -0700, Andrew Kreps wrote: If I'm reading that right, you're trying to get a list of your top 20 largest folders? What does 'watch' do? not the 20 largest, but the 20 last modified. the bash/watch commands sorts them alphabetically, i want to sort by time.

[Fish-users] evaluating $COLUMNS in a loop

2013-09-17 Thread Martin Bähr
On Wed, Sep 18, 2013 at 05:00:09AM +0200, Martin Bähr wrote: clear while true echo \e\[H for i in (ls -tr) du -sh $i end | tail -20 | sed -e 's/^/'\e'\[K/' | cut -c -(math $COLUMNS - 2) sleep 2 end one minor issue i still have is that in the above $COLUMNS appears