small programs used on the command line to do a specific job
2
votes
1answer
46 views
When do `sort -k 2,3b` and `sort -k 2,3` differ?
The POSIX description of the -b flag for the sort command is
Ignore leading characters when determining the starting and ending positions of a restricted sort key.
I can understand the use for ...
5
votes
1answer
23 views
`unbuffer` or `stdbuf` for removing stdout buffering?
Is there a difference between unbuffer(1) and stdbuf(1)? From what I gather, unbuffer makes more than the "best effort" of calling the libc function set(X)buf at the beginning, and then letting things ...
2
votes
1answer
38 views
Checking the order of items in a shell environment variable
I am wanting to check that a certain directories always appear after other directories in an environment variable.
List items are separated by a colon, as with the PATH variable.
This is not simply ...
6
votes
2answers
85 views
Why is there a mix of symlinks and hardlinks in /bin?
I understand the technical difference between symlinks and hardlinks, this is a question about their use in practice, particularly I'm curious to know why both are used in seemingly similar ...
0
votes
0answers
29 views
Determine which memory stick contains an address?
I just run memtester and found a single error:
FAILURE: possible bad address line at offset 0x869a3bd8.
I can re-run memtester with individual memory sticks to determine which one is bad, but I ...
1
vote
1answer
57 views
Is there any tool to view live statistics about a Radeon GPU?
I've checked out GPU usage monitoring (CUDA), but are there similar tools for AMD/ATI cards? Or kind of universal tools? I want to check out if my applications use the 256 MB of RAM of the video card ...
2
votes
2answers
122 views
Where can I find some good documentation for bash printf?
man printf, info printf and printf --help are all pretty useless to me; I want an explanation of the FORMAT options. For example, I could use:
printf '%s\n' foo bar
and get output:
foo
bar
From ...
4
votes
5answers
145 views
Standard unix util to split “foo.bar.baz” into “foo.bar” + “.baz”?
I want to split a string $basename, containing the output in two parts, $stem and $ext, such that:
the string "${stem}${ext}" is identical to the original string $basename;
either $stem or $ext may ...
0
votes
1answer
83 views
wc - setting a terminating character
I've got that far: wc --files0-from=FILE lets one get the word count of a list of files. Each entry in this list mus be terminated with an ASCII NUL character.
Question: A way to set a terminating ...
1
vote
4answers
176 views
crash shell: any way to check if a command executed Successfully
I'm automating a test using crash package. Is there some thing like $?, which can be used to check if the previous command executed successfully or not inside a crash shell?
For example, when ...
2
votes
1answer
69 views
Is there a text-only equivalent (no curses) of `zenity --question`?
For my mercurial commit hook, I want to run my test cases and be asked whether I really want to commit if any of the tests fail. I'm thinking something like <run-the-tests> || ...
1
vote
1answer
84 views
Is Mac OS X really SUS compliant?
Internet says that Mac OS X 10.8 has achieved certification to The Open Group UNIX® 03 standard and that it is a compliant system.
But a simple test with echo seems to indicate otherwise:
a) The ...
1
vote
1answer
300 views
Install vmware-tools using yum in vmware fusion
I added vmware-tools repo [1] to my virtual CentOS box. What is the exact set of packages I have to install?
The rationale is to be able to update vmware-tools using yum.
Environment:
Host OS: Mac ...
-1
votes
1answer
177 views
using tr -t command [comprehension question]
When using tr -t command, string1 should be truncated to the length of string2, right?
tr -t abcdefghijklmn 123 # abc... = string1, 123 = string2
the cellar is the safest place # actual ...
3
votes
2answers
101 views
tac command's option creates strange output [comprehension question]
Say I have this file, containing nothing but
a
b
c
b
a
Using tac --separator=a file in BASH [on a Debian based Linux], I get this:
# empty line
# empty line
b
c
...