Split function not working in UNIX -
i'm trying run split on file filename has spaces in it.
i can't seem work. have following
source_file="test file.txt" split -l 100 $source_file
now i've tried enclosing $source_file
in "
no luck:
split -l 100 "\""$source_file"\""
or even
split -l 100 '"'$source_file'"'
i'm still getting:
usage: split [-l line_count] [-a suffix_length] [file [name]] or: split -b number[k|m] [-a suffix_length] [file [name]]
you're trying hard! single set of double quotes suffice:
split -l 100 "$source_file"
you want arguments split this:
-l 100 test file.txt
the commands trying both yield these arguments:
-l 100 "test file.txt"
as in, equivalent incorrect command:
split -l 100 '"test' 'file.txt"'
Comments
Post a Comment