Skip to content

Instantly share code, notes, and snippets.

@r9y9
Created October 25, 2016 08:38
Show Gist options
  • Save r9y9/280e94492969ea28585fecbcb4007f04 to your computer and use it in GitHub Desktop.
Save r9y9/280e94492969ea28585fecbcb4007f04 to your computer and use it in GitHub Desktop.
sedでゴリ押し
#!/bin/bash
REPL_RESULT=$(kotlinc << EOF
import java.time.*
println(OffsetDateTime.now().toString())
EOF)
TIME_STR=$(echo $REPL_RESULT | sed -e 's/\(.*\)println(OffsetDateTime.now().toString())\(.*\) >>>/\2/g' | awk '{print $1}')
echo $TIME_STR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment