sh read command eats backslashes in input?

Accrding to: http://www.vias.org/linux-knowhow/bbg_sect_08_02_01.html : -r If this option is given, backslash does not act as an escape character. The backslash is considered to be part of the line. In particular, a backslash-newline pair may not be used as a line continuation. It works on my machine. $ echo ‘\&|’ | while read -r in; do … Read more

Exit codes bigger than 255 — possible?

Using wait() or waitpid() It is not possible on Unix and derivatives using POSIX functions like wait() and waitpid(). The exit status information returned consists of two 8-bit fields, one containing the exit status, and the other containing information about the cause of death (0 implying orderly exit under program control, other values indicating that … Read more

ImageMagick command to convert and save with same name

Another way: convert *.jpg -resize 80% -set filename:f ‘%t’ ../’%[filename:f].jpg’ Will place converted files in the folder above. The option -set filename:f ‘%t’ sets the property filename:f to the current filename without the extension. Properties beginning with filename: are a special case that can be referenced in the output filename. Here we set it to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)