bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to input ^J?


From: Bob Proulx
Subject: Re: How to input ^J?
Date: Sun, 18 Jul 2010 17:47:19 -0600
User-agent: Mutt/1.5.18 (2008-05-17)

Peng Yu wrote:
> I have some filenames that have the character ^J. I can not figure out
> a way to input such a character. Does anybody know if it is possible
> to input ^J?

Several ways.  One is you can quote the characters "verbatim" with C-v
before the character.  As in C-v C-j.  (A.K.A. ^v ^j) But since it is
also a character in the IFS (input field separator) you would need to
quote it to prevent it from being lost on the command line as
whitespace.

Since you are quoting it you can simply enter a real newline.  Either
way that looks the same after entering it.

  ls -ldbog "foo
  bar"
  -rw-rw-r-- 1 0 Jul 18 17:45 foo\nbar

Lastly since ^J is a newline you can generate one with echo "\n".

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]