Преглед на файлове

Merge pull request #29 from koalaman/patch-1

Simplified manual parsing example.
Dalton Nell преди 9 години
родител
ревизия
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