Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
remzi-arpacidusseau
GitHub Repository: remzi-arpacidusseau/ostep-projects
Path: blob/master/tester/xv6-edit-makefile.sh
909 views
1
#! /bin/bash
2
3
infile=$1
4
testnames=$2
5
6
gawk -vtestnames=$testnames '
7
($1 == "_mkdir\\") {
8
n = split(testnames, x, ",");
9
for (i = 1; i <= n; i++) {
10
printf("\t_%s\\\n", x[i]);
11
}
12
}
13
14
{
15
print $0;
16
}' $infile
17
18