#!/bin/bash #This script splits 'p4 configure show' output and adds #'p4 configure set' in front of the key-value pairs. #The output can then be run against a server to replicate #the customers config. echo "Please enter the name of the source file containing the p4 configure show output" read sourcefile echo "The file containing config data is $sourcefile" #Split out the key-value pairs and trim spaces: while read line do echo "p4 configure set $line" done < <(cat $sourcefile | cut -d':' -f2 | sed 's/ //g') >> output.txt
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 29306 | Jen Bottom |
Copying up the change that removes space characters from my dev stream. It should be possible to actually replay the output now. |
||
#1 | 29270 | Jen Bottom | Putting configsplitter.sh in a different location | ||
//guest/jen_bottom/scripts/configsplitter.sh | |||||
#1 | 29269 | Jen Bottom | Copy up of simple script to split configure show output, so it can easily be replayed for repros etc. |