$ cat hoge.txt 111 222 333 $ cat hoge.txt | tr \\n \\ | sed -e 's/\\/\\n/g' 111\n222\n333\n
æ¥åãªã©ã§ããã¹ã¯ã¼ããªã©ã§ä¹±æ°ãæååãå¿ è¦ã«ãªããã¨ãããã¾ãã ãã®é½åº¦ãçææ¹æ³ã調ã¹ã¦ããã®ã§åå¿ã¨ãã¦è¨è¼ãã¦ããã¾ãã Linux ã®å ´åããã£ã¹ããªãã¥ã¼ã·ã§ã³ã«ãã£ã¦ã¯ããã¹ã¯ã¼ãï¼ã©ã³ãã ãªæååï¼ãçæããã³ãã³ããããã¾ããã»ã»ã» â bashï¼zshï¼ã§ä¹±æ°ï¼ã©ã³ãã ãªæ°å¤ï¼ãçæ â çµã¿è¾¼ã¿å¤æ° $RANDOM ãå©ç¨ãã¦ä¹±æ°ãçæ çµã¿è¾¼ã¿å¤æ°ã® $RANDOM ãåç §ããã¨ãã0 ï½ 32767ãã®å¤ãå¾ããã¾ãã $ echo $RANDOM 30317 ã©ã³ãã ãªæ°å¤ãé£ç¶ã§10åãçæããã¨ç°ãªãæ°å¤ãåºåããã¾ãã $ for i in $(seq 1 10); do echo ${RANDOM}; done 277 15184 16027 14271 26543 18198 9427 6422 3932 5070 â /dev/urandom ã
ä»æã®é£æ°æ ãæ®éã®å¥³åæ ¡çããããã©ãããã£ã¦ã¿ãããã®ãã¹ã³ãããã£ã©ã¯ã¿ã¼ãéå¿ãããããããã£ã©ã°ã©ã³ããªã«åºå ´ä¸ã§ãã ææ°æ å ±ï½TBSãã¬ãï¼æ®éã®å¥³åæ ¡çããããã©ãããã£ã¦ã¿ãã å ¬å¼ãã¼ã ãã¼ã¸ éå¿ããï½ãããã£ã©ã°ã©ã³ã㪠ãªãã£ã·ã£ã«ã¦ã§ããµã¤ã æ票ã¯ã¡ã¼ã«ã¢ãã¬ã¹1ã¤ã«ã¤ã1æ¥1åç票å¯è½ã§ãã éå¿ããã¯ç¾å¨41ä½(2014å¹´9/21æç¹)ã¨ãªããªãå³ããé ä½ã å¿æ´ããããã©æ¯æ¥HPã«ãã£ã¦æ票ããã®ã¯çµæ§æé⦠ã¨ããããã§ãcURLã³ãã³ãã使ã£ã¦ããã£ã¨æ票ãèªååãã¦ã¿ã¾ããã ãããã£ã©ã°ã©ã³ããªã«ç»é² ãããããããããã£ã©ã°ã©ã³ã㪠ãªãã£ã·ã£ã«ã¦ã§ããµã¤ã ã§ã¡ã¼ã«ã¢ãã¬ã¹ãç»é²ãã¦ããå¿ è¦ãããã¾ãã ãããã£ã©Â®ã°ã©ã³ã㪠IDï¼ã¡ã¼ã«ã¢ãã¬ã¹ï¼ç»é²ï½ãããã£ã©ã°ã©ã³ã㪠ãªãã£ã·ã£ã«ã¦ã§ããµã¤ã 詳細ã¯å²æ cURLã使ã£ãèªè¨¼ããã©ã¼
ããã¯ã©ã®ã³ã³ãã¥ã¼ãã£ã³ã°APIãbashã¹ã¯ãªããã§ãªã¯ã¨ã¹ãããããã® ã¹ã¯ãªãããæ¸ãã¾ããã params ãã©ã¡ã¼ã¿ã¼ãå¤æ´ãããã¨ã§ãä»»æã®APIããªã¯ã¨ã¹ãã§ãã¾ãã #!/bin/sh urlencode() { # https://qiita.com/ik-fib/items/cc983ca34600c2d633d5 echo "$1" | nkf -WwMQ | sed 's/=$//g' | tr = % | tr -d '\n' } HOST="jp-east-1.computing.api.nifcloud.com" ACCESS_KEY="<YOUR ACCESS KEY>" SECRET_KEY="<YOUR SECRET KEY>" TIMESTAMP="`date -u +'%FT%T.%2NZ' | sed -e 's/:/%3A/g'`" decla
ð ð ð ð ã·ã§ã«ã¹ã¯ãªããã¯é ããã¦ä½¿ããªã æ®éã®ãéãè¨èªãããä½ç¾ããããä½ååãé ã ä»ã®ããã°ã©ãã³ã°è¨èªãçµé¨ãã¦ããã·ã§ã«ã¹ã¯ãªããã«å ¥éãããã®ãããªææ³ãæã¤æ¹ãå¤ãã®ã§ã¯ãªãã§ããããã å®éããããã£ããã¨ã¯å¾ã ã«ãã¦èµ·ããå¾ã¾ãã®ã§ããéãè¨èªãã使ãã¹ããå¦ãè¦æ¥µãããã¨ã¯å¤§äºã ã¨æãã¾ãã ããããæ¬å½ã«ã·ã§ã«ã¹ã¯ãªããã¨ããã®ã¯ãããã¾ã§é ãã®ã§ããããï¼ ãã¼ã¿éãå¤ãå ´åã¯å¸¸ã«æåãããéãè¨èªãã§æ¸ããæ¹ãããã®ã§ããããï¼ å®ã¯ãããã¨ãéãã¾ããã ã·ã§ã«ã¹ã¯ãªããã«ã¯ã·ã§ã«ã¹ã¯ãªãããªãã®ãéãæ¸ãæ¹ããããã¾ãã ãã®ãéãæ¸ãæ¹ãã§å¦çã§ããåé¡ã«é¢ãã¦ã¯ãã·ã§ã«ã¹ã¯ãªããã¯ãéãè¨èªããªã®ã§ãã ã§ã¯ããéãæ¸ãæ¹ãã¨ã¯ä½ãã¨ããã¨ã端çã«ã¯ãããããç¹°ãè¿ãããã«ã¼ãã¯ã·ã§ã«ã¹ã¯ãªããã§è¨è¿°ããªãããã¨ã§ãã 以ä¸ã§ããã説æ
ã¾ãã¯äºã®çºç«¯ã説æãã¾ãã /etc/passwdãã¡ã¤ã«ã¯ãã¦ã¼ã¶ã¼æ å ±ã1è¡ã«1ã¦ã¼ã¶ã¼åãã¤æ¸ãããããã¹ããã¡ã¤ã«ã§ãã1è¡ã¯ã³ãã³ã§åºåããã7ã¤ã®ãã£ã¼ã«ããããªãã¾ããåã¯ãæåã®ãã£ã¼ã«ãã§ããã¦ã¼ã¶ã¼åã¨ãæå¾ï¼7çªç®ï¼ã®ãã£ã¼ã«ãã§ãããã°ã¤ã³ã·ã§ã«ã ãã確èªãããã£ãã®ã§ããcat /etc/passwd ã¨ãã¦ãç´æ¥ç®ã§è¦ãã ã*1ã§ãã¦ã¼ã¶ã¼åã¨ãã°ã¤ã³ã·ã§ã«ãèªã¿åããã®ã§ãããã¡ãã£ã¨è¾ãããªãã¹ãè¦ããã表示ãããã®ã§ãã ãã®èª²é¡ãçè¨åãã«ãã¦ãLinux/Unixã³ãã³ãã©ã¤ã³ã§ã¡ãã£ã¨ããäºãããããã®å°å³ãªã³ãã³ãéã¨ã·ã§ã«æ§æãç´¹ä»ãã¾ãããã¹ã¯ãªããè¨èªï¼ä¾ãã°perlï¼ã使ãã°ããããããããã¨ãããæè¦ã»ãææã¯ã´ã¢ããã¢ã ã¨æãã¾ãããä»åã¯èãè³æã¡ã¾ãããï¼ã¹ã¯ãªããè¨èªå¦çç³»ã§ã¯ãªãï¼ã³ãã³ãã¨ã·ã§ã«ã®ç¯å²å ã§ã®ãã£ã¨è¯ãæ¹æ³ã¯æ¯
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}