setlocale(6, “”) = “en_IN” The setlocale() function is used to set or query the program’s current locale. #include <locale.h> #include<stdio.h> main() { char *strpointer; strpointer=setlocale(LC_ALL,””); printf(“\n %s \n”,strpointer); printf(“\n %d \n”,LC_ALL); } http://php.net/manual/en/function.setlocale.php National Anthem: Andorra [audio:http://www.freeinfosociety.com/media/sounds/4157.mp3]
Category Archives: Uncategorized
strrchr programming
strrchr(“/bin/pwd”, ‘/’) = “/pwd” strchr, strrchr, strchrnul – locate character in string. #define _GNU_SOURCE #include<stdio.h> #include<string.h> main() { char *stringp; stringp=strrchr(“/bin/pwd”,’/’); printf(“\n %s \n”,stringp); } http://php.net/manual/en/function.strrchr.php Agassi, Andre: Farewell to Tennis [audio: http://www.freeinfosociety.com/media/sounds/3828.mp3]
initialization routine
__libc_start_main(0x80493a0, 1, 0xbfea9f74, 0x804e4f0, 0x804e4e0 __libc_start_main is initialization routine. stack top = main = 0x80493a0 so stack top to bottom is from left to right. http://en.wikipedia.org/wiki/Prototype http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/baselib—libc-start-main-.html Armstrong, Neil: One Small Step For Man [audio: http://www.freeinfosociety.com/media/sounds/13.mp3]
getenv programming
getenv(“POSIXLY_CORRECT”) = NULL The getenv() function searches the environment list to find the environment variable name, and returns a pointer to the corresponding value string. if the output is NULL then it means that POSIXLY_CORRECT environment variable is not set to true. so the current program may not try to run in strict POSIX mode. …
stty
ahiliation@debian:~$stty speed 38400 baud; line = 0; eol = M-^?; eol2 = M-^?; swtch = M-^?; ixany iutf8 ahiliation@debian:~$ stty – change and print terminal line settings http://tldp.org/HOWTO/Modem-HOWTO-7.html Clinton, Bill: I Have Sinned [audio:http://www.freeinfosociety.com/media/sounds/3815.mp3]
mode
Status for device COM1: ———————– Baud: 1200 Parity: None Data Bits: 7 Stop Bits: 1 Timeout: OFF XON/XOFF: OFF CTS handshaking: OFF DSR handshaking: OFF DSR sensitivity: OFF DTR circuit: ON RTS circuit: ON Status for device COM2: ———————– Baud: 1200 Parity: None Data Bits: 7 Stop Bits: 1 Timeout: OFF XON/XOFF: OFF CTS handshaking: …
fold
ahiliation@debian:~$fold -w 8 file edit view terminal help file edi t view t erminal help ahiliation@debian:~$ fold – wrap each input line to fit in specified width http://linux.about.com/library/cmd/blcmdl1_fold.htm
uptime
ahiliation@debian:~$uptime 07:30:51 up 47 min, 3 users, load average: 0.25, 0.13, 0.10 ahiliation@debian:~$ uptime – Tell how long the system has been running. http://uptime.netcraft.com/
files.3
ahiliation:~$cat workethics.php ahiliation:~$php workethics.php The text has been savedahiliation:~$ ahiliation:~$cat workethics.txt Work ethics in QA Fashionahiliation:~$ http://www.phptutorial.info/learn/OpenReadCreate-files.php
files.2
ahiliation:~$php -r workethics.php Parse error: syntax error, unexpected $end in Command line code on line 1 ahiliation:~$vi workethics.php ahiliation:~$php workethics.php ahiliation:~$vi workethics.txt ahiliation:~$cat workethics.txt ahiliation:~$cat workethics.php http://bugs.php.net/