close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": libsvn_repos-1.so.1: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Dec 29, 2009, 12:09:09 AM (16 years ago)
- Author:
-
wade
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v15
|
v16
|
|
| 55 | 55 | |
| 56 | 56 | = sed = |
| | 57 | s function 類似 vim 的取代指令。 |
| 57 | 58 | {{{ |
| 58 | 59 | sed 's/要被取代的字串/新的字串/g' |
| 59 | 60 | }}} |
| | 61 | p function 可以印出資料,常與 -n 使用,才能只秀出處理過後的結果。 |
| | 62 | {{{ |
| | 63 | sed -n '9p' photoid |
| | 64 | }}} |
| | 65 | 將檔案中第 9 行字串傳給 $a 。 |
| | 66 | {{{ |
| | 67 | a=$(sed -n '9p' photoid ) |
| | 68 | }}} |
| | 69 | |
| 60 | 70 | |
| 61 | 71 | |