Skip to main content
6 votes

Is there an equivalent of caniuse for commands on posix systems?

There are a few tools or sites which can be used to find out which version of a project is available in various distributions (including non-Linux systems); see Is there a tool/website to compare ...
Stephen Kitt's user avatar
5 votes
Accepted

Joining 'fish shell' arguments into a single string with spaces

You're looking for string join ' ' $argv -- docs
glenn jackman's user avatar
2 votes
Accepted

Use fallocate with numbers from text file

If you're trying to loop over a sequence of whitespace separated numbers in a single line of list.txt then one way to do so in the bash shell would be to read them into an indexed array: read -a ...
steeldriver's user avatar
  • 81.9k
2 votes

Is there an equivalent of caniuse for commands on posix systems?

Almost no command will be present by default on all flavors with no package installation. You can consider the mandatory utilities section of POSIX standard, but while many of them are present on all ...
Ángel's user avatar
  • 3,594
1 vote

Get a list of all user's commands from a non-interactive shell

Turns out, I was quite close to the solution. I was confusing login shells and interactive shells. Different things. Instead of $SHELL --login, all I needed to do was $SHELL -i. The following will ...
zoickx's user avatar
  • 51
1 vote
Accepted

join a specific number of files/devices in linear mode together in a linux system

You can use a for loop to iterate from zero to 32, and store the device names in an array. # you don't show the file, there are programmatic ways to acquire this number n=33 devices=() for ((i = 0; i ...
glenn jackman's user avatar
1 vote

Delete 2-line paragraphs, keep 3-line paragraphs, maintain newline between all

With GNU awk: awk 'BEGIN{FS=RS; RS=""} NF==3{print; print ""}' file Output: aaa aaaaaa bb bbb cc cccc ccccc cccc fff ff ggg gggg gggg hhh hhh hh hhhh Output contains one ...
Cyrus's user avatar
  • 12.4k
1 vote

Bourne Shell EOL characters not working in shell handler

It turns out the issue wasn't actually the command or line terminators it was the way stream reader was handling the response. This is how I was handling the response var stream = ShellTcpClient....
DotNetRussell's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible