Reputation
19,850
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
2 24 67
Impact
~1.5m people reached

May
7
answered Is it common to split larger script into multiple scripts and source them in the main script?
May
6
answered `du` get different results on different machines for the same folder
May
6
answered Reading from a serial interface
May
5
comment Why is dnsmasq putting my router IP in /etc/resolv.conf instead of 127.0.0.1?
On which machine, 'A' or 'B', does dnsmasq run? Does dnsmasq do DHCP as well as DNS? What is the value of the "resolv-file" parameter in dnsmasq.conf?
May
4
comment Why is my download speed a lot lower in Linux than other OS?
Check the arithmetic - I've seen Windows FTP clients that were off by a factor of 10 when they stated download speeds, elapsed time and bytes.
May
3
comment Who cuts off first symbol of process substituted file and for what reason?
Same behavior for RHEL 5.0, bash 3.2.25, php 5.4.6. I can add that the problem also happens for named pipes. Do this: mknod named_pipe p; echo 123 > named_pipe; # go to another window; php named_pipe; It will show you "23".
May
3
comment Who cuts off first symbol of process substituted file and for what reason?
For what it's worth, I get the same behavior on a Slackware 11 box, bash 3.1.17, PHP 5.3.6. You might want to try "echo" instead of "cat" or "php" in your script to see what the "<(...)" construct gives you.
May
2
comment what's wrong with embedding php scripts inside bash ones?
"If a file is pure PHP code, it is preferable to omit the PHP closing tag at the end of the file." You be the judge if your file is pure PHP code.
May
2
comment what's wrong with embedding php scripts inside bash ones?
Can you re-phrase the question(s)? There's a lot going on, but I suspect that part of your problem is making too many assumptions. For example: "Thr first symbol is probably cut off by php". Sure, that seems like what your 5.sh shows, but why would the PHP interpreter cut off a '<'? It doesn't cut off other leading characters. Also, you're missing the '?>' after the PHP code, in 2.sh and others.
May
1
answered How does Linux know the Location of File Data on Disk
Apr
24
awarded  Citizen Patrol
Apr
24
answered Specifying a generic interpreter for a program like expect?
Apr
22
answered Why read() is slower than getc()?
Apr
22
answered where are the “files” of ipcs and why are named pipes (mkfifo) not listed in ipcs
Apr
17
comment sigaction(7): semantics of siginfo_t's si_code member
I only got the si_code value of 0x80 once, I've never gotten it again. It took my program a while to dump core again, and I had set ulimits incorrectly the first time, so I only got two more SIGSEGVs neither of which claimed to be "from the kernel". Still puzzled by that one.
Apr
17
comment sigaction(7): semantics of siginfo_t's si_code member
Getting a core dump allowed me to figure out the underlying problem: a data race condition, where a file could get created and then noticed by my program. The file could get deleted before my program tried to open it. I didn't handle ENOENT correctly, causing problems up the call stack.
Apr
17
accepted sigaction(7): semantics of siginfo_t's si_code member
Apr
15
answered cannot mount .img file - “not a directory” error
Apr
13
answered Start Repl/CLI in Background and Feed Commands
Apr
10
revised (Ab) use Apache as a proxy
Fix misspelling, add stop/start advice.