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

26m
revised Is there a way to grep a folder and show all lines containing non-ascii characters?
typo
27m
revised Is there a way to grep a folder and show all lines containing non-ascii characters?
typo
1h
comment What does the “-y” do in “yum -y groupinstall gnome”?
Ever heard of the man command? It can come handy at times.
8h
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.
9h
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.
9h
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.
10h
comment grep or find a pattern in all directories
Yes, I've just double checked those -r/-R were added in 5.3
10h
revised grep or find a pattern in all directories
added 92 characters in body
10h
comment grep or find a pattern in all directories
What version of AIX?
11h
revised Exclude directories with locate search
The OP actually wanted to _exclude_ directories.
11h
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.
11h
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?
11h
revised grep or find a pattern in all directories
added 672 characters in body
11h
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.
11h
answered grep or find a pattern in all directories
12h
revised How can I skip empty files with sed?
fixed quoting an expr nonsense.
14h
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 -
14h
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.
14h
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