Long Claw
Long Claw

Reputation: 107

How can i create a file that contains an enter in its name

I haven't found the answer to this question anywhere so i am just going to ask it here.

I am looking for something like touch "..." , is there something like a special character that replaces the enter key ?

I know this is really not useful for anything, but i am still wondering if it is possible.

Upvotes: 0

Views: 173

Answers (1)

Pierre François
Pierre François

Reputation: 6063

To create a file with a\nb as name from the shell, do v.gr.

touch 'a
b'

You can check the file has a new line char into its name by issuing next command:

for fn in *; do echo "filename=<$fn>"; done

Upvotes: 1

Related Questions