쉘로 always there for you를 Always There For You로 바꾸려면 어떻게 해야 하나요?
$str = "always there for you"; $str = ucwords($str); echo $str;
Always There For You
좋은 하루 되세요!!
답변 감사드립니다..
하지만 쉘로 할 수 있는 방법은 없을까요?
echo always there for you | awk 'BEGIN{RS=" "} {printf toupper(substr($1,1,1)) substr($1,2) " "}'
정도면 될까요? 사실 굳이 셸을 쓸 이유는 없습니다만.
$ echo "always there for you" | sed 's/\<\([a-z]\)/\U\1/g'Always There For You$ _
-- C FAQ: http://www.eskimo.com/~scs/C-faq/top.html Korean Ver: http://www.cinsk.org/cfaqs/
echo always there for you | perl -pe's/(\w+)/ucfirst$1/eg'
나
echo always there for you | perl -pe's/(\w+)/\u$1/g'
와~ 답변 감사드립니다~!
points
$str = "always there for
결과
Always There For You좋은 하루 되세요!!
points
답변
답변 감사드립니다..
하지만 쉘로 할 수 있는 방법은 없을까요?
points
echo always there for you |
echo always there for you | awk 'BEGIN{RS=" "} {printf toupper(substr($1,1,1)) substr($1,2) " "}'정도면 될까요? 사실 굳이 셸을 쓸 이유는 없습니다만.
points
$ echo "always there for
$ echo "always there for you" | sed 's/\<\([a-z]\)/\U\1/g'Always There For You
$ _
--
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Korean Ver: http://www.cinsk.org/cfaqs/
points
perl
echo always there for you | perl -pe's/(\w+)/ucfirst$1/eg'나
echo always there for you | perl -pe's/(\w+)/\u$1/g'points
와~ 답변
와~ 답변 감사드립니다~!