10,992 reputation
2449
bio website
location
age
visits member for 2 years, 4 months
seen 2 hours ago

Mar
29
comment How to eliminate /wiki/ directory in rewrite rule on a site dedicated for a wiki
Just .htaccess is not enough, afaik. Did you check LocalSettings.php file?
Mar
28
comment bash find lines starting with string
@Jérémie $q1 -- forces sed to quit with an error if pattern is not found. It also will finish with error if something is wrong with file (it's unreadable or broken). So it will quit with 0 exit status only in case pattern is found and it will be passed to print. Part with /^C/{n;/^C/q is pretty simple. If it find string that starts with C it will read the next line and if it also starts with C it will quit with zero exit status.
Mar
9
comment Use basename to parse a list of paths held in a file
Actually the best source would be man find in your console :)
Mar
9
comment Use basename to parse a list of paths held in a file
That's strange. I can see -printf even in posix man page. About the error with second way, it's cause of typo in my answer. Fixed. Could you please try it one more time?
Feb
6
comment Do I need to encapsulate awk variables in quotes in order to sanitize them?
Nope, if you'll take SOURCEIP in quotes inside awk, it won't be processed as variable.
Nov
29
comment difference between `for i in {1..$N}` and `for i in $(seq 1 1 $N) `
You can use eval echo ${1..$N}. That will expand it like expected. But be careful with eval, as eval is evil and if it's possible to avoid its use, it's better to do it.
Nov
21
comment mail: send email with attachment from commandline
@glennjackman yes, that's right. thanks for your note.
Nov
19
comment Using variable in KSH function
Could you show the exact code you're runnning? And did you try to execute it in verbose mode ( set -x )?
Nov
15
comment What does this regex mean?
@JoeDimaggio actually in sed \n is outside working pattern ( except cases when several lines are in the buffer, but even in that case the last \n will be outside the buffer ) and \r will appear just before \n.
Nov
15
comment What does this regex mean?
@JoeDimaggio You can use it directly. Initially ` symbol was hidden in your question. I updated my answer.
Nov
15
comment Remove all *.mp4 and *.zip but some files
@DrakaSAN you can use something like find . -name *.ext ! -name 1.ext
Oct
17
comment How to see interactive output when running commands from a bash script?
Try to specify -i option in she-bang. It may help you.
Sep
10
comment What does the command “$()” do in UNIX?
It was discussed hundreds of times. Please read documentation. // mywiki.wooledge.org/CommandSubstitution ; pubs.opengroup.org/onlinepubs/9699919799/utilities/… ; etc
Sep
6
comment Detecting SSH timeout
The only thing, it's not great with nested ssh connections. Otherwise it works perfect.
Sep
4
comment Change date after SSH login in shell script
ah, it looks like your function knows nothing about script parameters. change function call like in updated answer.
Sep
4
comment Change date after SSH login in shell script
If that is about setting correct time, why not to use ntp?
Sep
2
comment Simulate desktop over SSH?
Terminal is default application in case you didn't specify VNCAPP variable. Also you can use there some lightweight wm, like openbox or similar which will allow you to execute additional commands like in usual environment
Sep
2
comment Simulate desktop over SSH?
No, it doesn't require a DE. Please check my answer.
Sep
2
comment Simulate desktop over SSH?
Yes. VNC is exactly what you need. SSH is great for CLI, but for GUI it sucks. You can run VNC in background and connect to it via client on demand. If you need to secure you connection, you can tunnel your vnc in ssl or ssh. But it still will be vnc, not ssh.
Sep
2
comment Simulate desktop over SSH?
That's a bad idea, as ssh works too slow for X. Use vnc or something like that.