Reputation
523
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
4 16
Newest
 Caucus
Impact
~19k people reached

Mar
6
comment Load users environment variables in a cronjob
Oh, if the Bash start-up files contain Bash-only syntax, that won't work either -- you'll get export: command not found instead. Better really to put these in a Bash script and call that from Cron. Updated answer.
Mar
6
comment Load users environment variables in a cronjob
You forgot to fix the source: command not found error. Sorry about not mentioning it in my very initial answer.
Mar
6
comment Resolve packages not found and errors during configure,make,make install in a script
This has been resolved multiple times by multiple packaging systems already. The approach taken by both RPM and Debian is to create a build wrapper which reads the dependencies from a simple spec file. This needs to be maintained by hand for every package, but there are so many other things you need to tweak anyway that this is a minor nuisance.
Mar
6
comment Bash: Output of a command is written only to screen and not to another file while using tee, what could be the reason?
You are also using double redirection. print_log appends to $log and then you pipe to tee -a $log as well. The pipe will never receive any input so you could simply remove it; or for consistency, you could change the function so it just logs to stdout. The whole thing would be more elegant if you just added done | tee -a "$log" at the end of the loop, rather than redirect every command inside the loop. Then you can fix wget by just adding 2>&1 there.
Mar
6
answered Load users environment variables in a cronjob
Mar
6
comment Exim4 configuration to use several external ip for mail sending
You are just digging yourself deeper into the hole if you try to evade their policy restrictions. See what you can do to simply send less email into Gmail, or get a proper agreement with them to have you exempted from the restriction.
Mar
6
comment Issue with Bash Script On FreeBSD
As an aside, collecting the output from find into a variable only to print the value of that variable is rather pointless. Just run the find command after the headers and have it print its output into the report. Somewhat similarly, grep 'interactive/pam' /var/log/auth.log avoids a completely useless cat and drops the (here) redundant -E flag.
Mar
6
comment Issue with Bash Script On FreeBSD
I would add head -n 2 /var/log/auth.log; tail -n 2 /var/log/auth.log to get an idea of what's in the log file at the time the script runs.
Mar
6
comment Issue with Bash Script On FreeBSD
The parentheses around (true) are useless.
Mar
6
comment Should I be adding aliases to /etc/profile instead of /etc/basrhc?
You should be using shell functions, not aliases. Aliases are less featureful, more brittle, and offer no advantages over shell functions.
Mar
6
comment how to filter sar -d disk output tidily
Did you try tr -d '\015' as suggested on SO?
Mar
6
answered Bash evaluation baffling
Mar
6
suggested approved edit on FROM: header is forged, SENDER: is legit , spam is delivered. how to detect?
Jan
26
comment Comparison of methods to send Postfix emails to Procmail
Instead of updating the question, post an answer and mark it as accepted. That way, this question will no longer show up as unresolved. Thanks.
Jan
22
revised Procmail recipe with capturing group
Link to regex background
Jan
22
revised Procmail recipe with capturing group
Explain logic of two conditions for trimming @, and additional benefit of ^TO_ to avoid false positives
Jan
21
revised Procmail recipe with capturing group
Fix formatting
Jan
21
suggested approved edit on Procmail recipe with capturing group
Jan
19
answered Procmail recipe with capturing group
Jan
19
awarded  Notable Question