Skip to content

Instantly share code, notes, and snippets.

@n01r
Last active April 17, 2019 12:11
Show Gist options
  • Select an option

  • Save n01r/716a78da7630124a8cd008bd3e7d6173 to your computer and use it in GitHub Desktop.

Select an option

Save n01r/716a78da7630124a8cd008bd3e7d6173 to your computer and use it in GitHub Desktop.
Run bpmeta on files matching pattern
#!/bin/bash
# 1. Go to a directory where you have PIConGPU ADIOS output
# 2. Create a list of filenames matching your pattern, e.g. "fields"
f=$(\ls | grep fields)
# 3. Run bpmeta on all of them
for fdir in $f
do
# The naming pattern is for me "simData_fields_all_<step>.bp.dir"
# We cut at every "." and only select the field 1 and 2 so that we do
# bpmeta "simData_field_all_<step>.bp"
file=$(echo $fdir | cut -d . -f1,2)
bpmeta -z $file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment