Skip to content

Instantly share code, notes, and snippets.

@papachristoumarios
Created March 29, 2020 11:10
Show Gist options
  • Save papachristoumarios/62131ba4ee62f4742a014e39ba110a20 to your computer and use it in GitHub Desktop.
Save papachristoumarios/62131ba4ee62f4742a014e39ba110a20 to your computer and use it in GitHub Desktop.
Convert undirected edgelist to directed with awk
#!/bin/bash
awk '{print $2 " " $1}' $1 >$1_rev
cat $1 $1_rev >$1_merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment