2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
14
Task/Make-directory-path/AWK/make-directory-path.awk
Normal file
14
Task/Make-directory-path/AWK/make-directory-path.awk
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# syntax: GAWK -f MAKE_DIRECTORY_PATH.AWK path ...
|
||||
BEGIN {
|
||||
for (i=1; i<=ARGC-1; i++) {
|
||||
path = ARGV[i]
|
||||
msg = (make_dir_path(path) == 0) ? "created" : "exists"
|
||||
printf("'%s' %s\n",path,msg)
|
||||
}
|
||||
exit(0)
|
||||
}
|
||||
function make_dir_path(path, cmd) {
|
||||
# cmd = sprintf("mkdir -p '%s'",path) # Unix
|
||||
cmd = sprintf("MKDIR \"%s\" 2>NUL",path) # MS-Windows
|
||||
return system(cmd)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue