Session Example
From C3LearningLabs
Revision as of 10:27, 26 September 2023 by Rego Granlund (talk | contribs) (→Set Default Configuration Files)
Demo Configurations
The following demo configurations are included in the installation
- LogisticsWater
- P1-F4W2
- LogisticsWaterFuel
- P1-F4W1G1
- RescuePersons
- P1-F2R1T1
Project Configurations
The following projects configurations are included in the installation
|
|
|
}
Copy existing configuration
Linux Commands
Rename multiple files in folder
- Install Linux:
sudo apt-get install mmv
- Install Mac:
brew install mmv
mmv <FROM>\* <TO>\#1
Example:
$ ls
a1.txt a2.txt a3.txt
mmv a\* b\#1
ls
b1.txt b2.txt b3.txt
Example:
- Mac
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1
mmv P8F3WR3U2\* P4FWRU\#1
- Linux
cd /home/rego/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1
mmv P8F3WR3U2\* P4FWRU\#1
- WSL Window Subsystem Linux
cd /mnt/c/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1
mmv P8F3WR3U2\* P4FWRU\#1
Replace string in multiple files
sudo find . -type f -name "*.txt" -print0 | xargs -0 sed -i "" -e 's/[FROM]/[TO]/g'
Example:
- Mac
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1
sudo find . -type f -name "*.con*" -print0 | xargs -0 sed -i "" -e 's/P8F3WR3U2/P4FWRU/g'
- Linux (Works but give error message "sed: can't read : No such file or directory")
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1
sudo find . -type f -name "*.con*" -print0 | xargs -0 sed -i "" -e 's/P8F3WR3U2/P4FWRU/g'