root/branches/newmole/scripts/morning_dateit.pl

Revision 297, 0.7 kB (checked in by gary, 3 years ago)

NA break mole_co_step into two pieces, _1 and _2, to speed up compilation
remove mole_co_step

NA add N2H+ to chemistry

iter_startend better doc of problem with stop line command

some test cases had changes in SiO and H3+ as a result - botch but not big botch

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1#!/usr/bin/perl/
2
3# bring in the perl module that includes copy
4use File::Copy;
5$input = "date.h";
6$working = "working.txt";
7
8copy $input , $working ;
9
10
11# get current time and date
12($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
13                                            gmtime(time);
14
15
16# previous file is named .bak
17$old = "YEARRR";
18# system "grep $old $working";
19# $working =~ s/$old/$year/gi;
20
21# change name of file within the main input script
22system( "sed -es/\"YEARRR\"/$year/ < $input > year.txt ") ;
23system( "sed -es/\"MONTHHH\"/$mon/ < year.txt > month.txt ") ;
24system( "sed -es/\"DAYYY\"/$mday/ < month.txt > day.txt ") ;
25
26
27copy "day.txt" , "../source_hot/date.h";
28
29unlink 'year.txt' , 'month.txt' , 'day.txt' , 'working.txt' ;
30
31
Note: See TracBrowser for help on using the browser.