105,226 reputation
13123256
bio website
location European Union
age
visits member for 2 years, 7 months
seen 9 mins ago

32s
comment What does the “-y” do in “yum -y groupinstall gnome”?
Ever heard of the man command? It can come handy at times.
7h
comment How to conditionally do something if a command succeeded or failed
That works but is convoluted. You're running ping in a subshell of a subshell, the output of ping is captured in view of running it as a command. But because the output is redirected to /dev/null that will always be the empty string. So you're running nothing in a subshell, which means the previous exit status (of the command substitution subshell, that is of ping) will be retained. Obviously, the correct way is if ping ...; then here.
8h
comment How do I use man pages to learn how to use commands?
And don't use that command which is dangerous, inefficient and unreliable.
8h
comment Where is “export var=value” not available?
@jrw32982, because it's a builtin. You still get that in modern POSIX shells but only for special builtins which export is.
9h
comment grep or find a pattern in all directories
Yes, I've just double checked those -r/-R were added in 5.3
9h
revised grep or find a pattern in all directories
added 92 characters in body
9h
comment grep or find a pattern in all directories
What version of AIX?
9h
revised Exclude directories with locate search
The OP actually wanted to _exclude_ directories.
9h
comment grep or find a pattern in all directories
For your penance, can you please go and double-check if AIX's grep -R searches in fifos, devices or the target of symlinks? mkdir X; ln -s /etc/issue X/a; mkfifo X/b; grep -R . X and see if it hangs or matches on /etc/issue.
10h
comment grep or find a pattern in all directories
Did you not ask that same question just 3 weeks ago? What's wrong with the answers you got there? What version of AIX are you using?
10h
revised grep or find a pattern in all directories
added 672 characters in body
10h
comment grep or find a pattern in all directories
Having options after arguments is a GNUism and will typically not fork in non-GNU systems like the OP's AIX. Also note that the meaning of -r/-R is reversed between GNU and AIX greps. You command may not work if there are file names that start with -. It will also exclude hidden files and dirs in the current directory, but not in sub-directories.
10h
answered grep or find a pattern in all directories
10h
revised How can I skip empty files with sed?
fixed quoting an expr nonsense.
13h
revised Is there `find`'s `-exec` like option in `ack-grep`?
It's --null for GNU and FreeBSD grep. Adding guard agains filenames starting with -
13h
revised Is there `find`'s `-exec` like option in `ack-grep`?
Avoid running rm if no file is found. Need -- as ack doesn't add the ./ prefox.
13h
revised while: command not found
missing quotes. Add the function approach.
1d
revised cat to stderr while reading to end of file marker
added 64 characters in body
1d
comment cat to stderr while reading to end of file marker
This is the right site.
1d
answered cat to stderr while reading to end of file marker