Skip to content

Commit

Permalink
Add a space after ">" redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
sschuberth committed Jul 20, 2012
1 parent 6b2ae50 commit 4939f5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions android/show_tasks.sh
Expand Up @@ -12,7 +12,7 @@ dump=$(adb shell dumpsys activity)
line_begin=$(echo "$dump" | grep -P -m 1 -n "^\s*TaskRecord.*$1" | grep -P -o "^\d+")

i=1
while [ "$line_begin" -eq "$line_begin" ] 2>/dev/null; do
while [ "$line_begin" -eq "$line_begin" ] 2> /dev/null; do
# Remove all lines before the first match.
dump_tail=$(echo "$dump" | tail -n +$line_begin)

Expand All @@ -22,7 +22,7 @@ while [ "$line_begin" -eq "$line_begin" ] 2>/dev/null; do
# Get the line number of the match after the first match.
line_end=$(echo "$dump_tail1" | grep -P -m 1 -n "^\s*TaskRecord" | grep -P -o "^\d+")

if [ "$line_end" -eq "$line_end" ] 2>/dev/null; then
if [ "$line_end" -eq "$line_end" ] 2> /dev/null; then
# Remove all lines after and including the second match.
dump_head=$(echo "$dump_tail" | head -n $line_end)
else
Expand Down

0 comments on commit 4939f5f

Please sign in to comment.