浏览代码

Merge pull request #29 from koalaman/patch-1

Simplified manual parsing example.
Dalton Nell 8 年前
父节点
当前提交
316207cd23
共有 1 个文件被更改,包括 3 次插入9 次删除
  1. 3
    9
      README.md

+ 3
- 9
README.md 查看文件

@@ -43,15 +43,9 @@ https://gist.github.com/naelstrof/6530959
43 43
 For those of you who don't want eval to be an integral part of slop (Could be dangerous if I were evil!): You can change the output format and parse it manually like so:
44 44
 ```bash
45 45
 #!/bin/bash
46
-slopoutput=$(slop -f "%x %y %w %h %g $i")
47
-X=$(echo $slopoutput | awk '{print $1}')
48
-Y=$(echo $slopoutput | awk '{print $2}')
49
-W=$(echo $slopoutput | awk '{print $3}')
50
-H=$(echo $slopoutput | awk '{print $4}')
51
-G=$(echo $slopoutput | awk '{print $5}')
52
-ID=$(echo $slopoutput | awk '{print $6}')
53
-maim -g $G -i $ID
54
-ffmpeg -f x11grab -s "$W"x"$H" -i :0.0+$X,$Y -f alsa -i pulse ~/myfile.webm
46
+read -r X Y W H G ID < <(slop -f "%x %y %w %h %g %i")
47
+maim -g "$G" -i "$ID"
48
+ffmpeg -f x11grab -s "$W"x"$H" -i ":0.0+$X,$Y" -f alsa -i pulse ~/myfile.webm
55 49
 ```
56 50
 
57 51
 ## Lets see some action