-1

I need to create new file which contains spaces in it. And it is passed through the argument. This code below creates 2 sepate files. How to create 1 file which will contains space?

touch ""$meno""
Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
applenic
  • 581
  • 3
  • 8
  • 21

2 Answers2

0

Try this:

$ spam="foo bar"
$ touch "$spam"
$ ls -l
-rw-rw-r-- 1 user user   0 Mar 29 05:14 foo bar
heemayl
  • 54,820
  • 8
  • 124
  • 141
-2

Try this:

IFS=$(echo -en "\n\b")
touch "$yourfile"
PersianGulf
  • 10,728
  • 8
  • 51
  • 78