Menu ▾ ▴

#12 There is no common script for copying data snapshots around

Fixed
nobody
None
High
Defect
2009-08-26
2009-03-23
Anonymous
No

Originally created by: anders.j...@gmail.com
Originally owned by: anders.j...@gmail.com

A number of scripts in $PENCIL_HOME/bin/ are used to copy data snapshots
around. It would be good to make one common script, e.g. pc_copy_varfiles,
that can

1. Copy VAR* to var.dat 2. Copy var.dat to VAR* (most often VAR0) 3. Copy
only in some of data/proc* 4. With or without particle snapshot files 5. ...

09/23/07 12:28:15 changed by Wolfgang.Dobler@ucalgary.ca

[From an e-mail by Anders, 23-Sep-2007:] I've thought about something like
pc_copy_var with functionality like

  pc_copy_var 1 var         --> copy data/proc*/VAR1 to data/proc*/var.dat
  pc_copy_var 1 v           --> v is alias of var.dat (like var is)
  pc_copy_var v myfile.dat  --> copy var.dat to myfile.dat
  pc_copy_var 100 ../run2/data/v --> copy VAR100 to ../run2

May I suggest to add more aliases:

    var.dat ~ var ~ v
    VAR10 ~ V10 ~ 10

[and even Macs can distinguish V from v here] because I think that

    pc_copy_var VAR1 var.dat

is way clearer for people who use this script only occasionally.

Actually, a zeroth order version that would just implement the explicit
syntax `pc_copy_var VAR1 var.dat' could be written in about five lines of
bash (the equivalent of a Perl one-liner :-), because it would simply put
the loop around the cp command.

Related

Tickets: #24

Discussion

  • Anonymous

    Anonymous - 2009-08-26

    Originally posted by: anders.j...@gmail.com

    The script is in place. It would be good to have it execute by default and to use -n
    to show the command without executing.

     
  • Anonymous

    Anonymous - 2009-08-26

    Originally posted by: anders.j...@gmail.com

    (No comment was entered for this change.)

    Status: Fixed

     

Log in to post a comment.