Skip to content

Commit

Permalink
yet another attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly committed Sep 16, 2024
1 parent e6671c8 commit d080e36
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions dnsping.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ stderr 'Successfully wrote .* bytes of Json data to stdout'
[unix] !dnsping -c 1 -json notwriteable.json www.google.com 8.8.8.8
[unix] stderr '\[F\] Unable to create notwriteable.json: open notwriteable.json: permission denied'

[windows] dnsping -c 1 -json notwriteable.json www.google.com

# json writing to file
dnsping -c 1 -json ok.json www.google.com 8.8.8.8
stderr 'Successfully wrote .* bytes of Json data to ok\.json'
grep '"Server": "8.8.8.8:53",' ok.json

# how to do this without pkill?
[unix] dnsping www.google.com 8.8.8.8 &
[unix] exec sleep 3
Expand All @@ -74,9 +81,5 @@ stderr 'Successfully wrote .* bytes of Json data to stdout'
[unix] stderr 'will query until interrupted'
[unix] stdout '0 errors \(0.00%\), [34] success.'

# json writing to file
dnsping -c 1 -json ok.json www.google.com 8.8.8.8
stderr 'Successfully wrote .* bytes of Json data to ok\.json'
grep '"Server": "8.8.8.8:53",' ok.json

-- notwriteable.json --
empty

0 comments on commit d080e36

Please sign in to comment.