http://mycroftproject.com/search-engines.html?name=it.nodong.net


eregi("AAA", "BBB") 

-->

preg_match("#AAA#i", "BBB")



1. - : 왼쪽 정렬, 기본값은 오른쪽 정렬임

$ cat 1.c

int main()

{

char buf[] = "ABC";

char res[100];

sprintf(res, "%10s", buf);

printf("res:[%s]\n", res);

sprintf(res, "%-10s", buf);

printf("res:[%s]\n", res);


}

$cc 1.c

$a.out

res:[            ABC]

res:[ABC            ]



참고:http://en.wikipedia.org/wiki/Printf_format_string


$ du -sk * | sort -nr            

(HP-UX)


shell find function sgrep

shell 2013. 12. 18. 13:26
sgrepall() # find string in all files
{
find . -type f -print | xargs grep $1
# find . -type f -name "*.c" -print | xargs grep $1
# find . -type f -name "*.cp" -print | xargs grep $1
# find . -type f -name "*.h" -print | xargs grep $1
}

##### END


#### HP-UX tcsh (BEGIN)

alias sgrep 'find ./  -type f -exec grep \!* {} /dev/null \;'

#### HP-UX tcsh (END)




select * from all_col_comments where table_name = "EMP":



tortoisegit git

카테고리 없음 2013. 12. 16. 14:49

php 5.3 기준으로 ereg() 함수 대신 preg_match() 를 써야 한다


csh round

shell 2013. 12. 12. 14:14

#!/bin/csh

set aa=5.67

set round=`echo $aa|awk '{printf "%.0f\n", $1}'`

echo $aa

echo $round


set aa=5.43

set round=`echo $aa|awk '{printf "%.0f\n", $1}'`

echo $aa

echo $round



csh loop

shell 2013. 12. 11. 16:57


#!/bin/csh

# demoloop.csh - Sample loop script

set j = 1

while ( $j <= 5 )

echo "Welcome $j times"

@ j++

end




출처:http://www.cyberciti.biz/faq/csh-shell-scripting-loop-example/