Activity for alx
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #289934 |
Post edited: |
— | about 1 year ago |
Edit | Post #289934 |
Post edited: |
— | about 1 year ago |
Edit | Post #289934 |
Post edited: |
— | about 1 year ago |
Edit | Post #289934 |
Post edited: |
— | about 1 year ago |
Edit | Post #289934 |
Post edited: |
— | about 1 year ago |
Edit | Post #289934 |
Post edited: |
— | about 1 year ago |
Edit | Post #289934 | Initial revision | — | about 1 year ago |
Answer | — |
A: How to identify and separate standalone applications from libraries in Linux package lists? This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch. With apt-file(1), you can list the files that a package provides. From that list, you can see if the package provides files... (more) |
— | about 1 year ago |
Edit | Post #289933 |
Post edited: |
— | about 1 year ago |
Edit | Post #289933 |
Post edited: |
— | about 1 year ago |
Edit | Post #289933 |
Post edited: |
— | about 1 year ago |
Edit | Post #289933 |
Post edited: |
— | about 1 year ago |
Edit | Post #289933 |
Post edited: |
— | about 1 year ago |
Edit | Post #289933 |
Post edited: |
— | about 1 year ago |
Edit | Post #289933 |
Post edited: |
— | about 1 year ago |
Edit | Post #289933 | Initial revision | — | about 1 year ago |
Answer | — |
A: How to list the first x files in each directory Here's my approach: ```sh find l1 -type d \ | while read d; do find $d -maxdepth 1 -type f \ | head -n3; done; ``` If your middle directories also contain files, it will also show them (of course, only the first 3). This is what it shows for me in a tree similar to yours, where I add... (more) |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 | Post undeleted | — | about 1 year ago |
Edit | Post #289931 | Post deleted | — | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 |
Post edited: |
— | about 1 year ago |
Edit | Post #289931 | Initial revision | — | about 1 year ago |
Answer | — |
A: How to overwrite each line of STDOUT with the next one? Instead of having new stdout lines overwrite the previous one, it seems better to specify that old stdout lines should be overwritten by anything that comes after them. This has the benefit that stdout cannot overwrite stderr (or anything else that goes in the tty). ```sh #!/bin/sh setterm ... (more) |
— | about 1 year ago |
Comment | Post #289899 |
Why set `lines=` to empty before entering the alternate screen? (more) |
— | about 1 year ago |
Comment | Post #289899 |
Why are the two trap(1) calls at different locations? (more) |
— | about 1 year ago |
Comment | Post #289899 |
Makes sense. Thanks! (more) |
— | about 1 year ago |
Comment | Post #289899 |
Thanks Kamil! Makes sense.
@quasimodo, no, that would have the same problems as my suggestion. (more) |
— | about 1 year ago |
Comment | Post #289899 |
Why do you need the `echo x` trick? What happens without it?
I think this would be simpler:
```sh
...
lines="$(tee /dev/tty | tail -n "$n")"
leave
printf '%s\n' "$lines"
```
Am I missing anything?
(more) |
— | about 1 year ago |
Comment | Post #289899 |
What's the reason for redirecting the whole `enter()` and `leave()` functions to /dev/tty?
Do both setterm(1) and tput(1) need to be redirected? Or is it only necessary to redirect one of them? (more) |
— | about 1 year ago |
Comment | Post #289875 |
Thanks!
Just a minor nitpick: `$COLUMNS` is not available (unless I export it manually). I replaced it with `tput cols`:
```sh
$ cat /usr/local/bin/ovr
#!/bin/sh
sed "s/^\(.\{,$(tput cols)\}\).*$/\1/;2,\$s/^/\x1B[1A\x1B[K/";
```
(see <https://stackoverflow.com/a/263900>) (more) |
— | about 1 year ago |
Edit | Post #289876 |
Post edited: |
— | about 1 year ago |
Edit | Post #289876 |
Post edited: |
— | about 1 year ago |
Edit | Post #289876 |
Post edited: |
— | about 1 year ago |
Edit | Post #289876 | Initial revision | — | about 1 year ago |
Answer | — |
A: Ergonomic way to search man pages Unix filters are quite handy. First of all, you can get an index of any manual page with a simple grep(1): ```sh $ man pacman | grep '^[^ ]' PACMAN(8) Pacman Manual PACMAN(8) NAME SYNOPSIS DESCRIPTION OPERATIONS OPTIONS TRANSACTION OP... (more) |
— | about 1 year ago |