Updated: 17 March 2024
Kebab case | nav-links |
Camel case | navLinks |
Pascal case | NavLinks |
Snake case | nav_links |
Freelance software engineer United Kingdom
Updated: 17 March 2024
Kebab case | nav-links |
Camel case | navLinks |
Pascal case | NavLinks |
Snake case | nav_links |
Updated: 08 February 2024
Write lines of text to file, with alternating line-ending type: CRLF
, LF
then finally LF
. Use hexdump to verify the result
echo -n -e \\x61\\x0d\\x0a\\x62\\x0a\\x63\\x0a > file
cat file
hexdump --canonical file
Output
a
b
c
00000000 61 0d 0a 62 0a 63 0a |a..b.c.|
00000007
Vim displays CR
as ^M
\r\n
DOS / Windows – carriage return + line feed.
CRLF
DOS / Windows – carriage return + line feed.
0d 0a
output of hexdump -C
0xD 0xA
alternatively
\n
Unix – line feed.
LF
Unix – line feed.
0a
output of hexdump -C
0xA
alternatively
A program that converts plain text files in DOS/MAC format to UNIX format.
Recursively find all files in current directory and run dos2unix
on each
find . -type f -exec dos2unix {} \;
A program that converts text files in UNIX format to DOS format.
Convert and replace a.txt. Convert and replace b.txt.
unix2dos a.txt b.txt
Updated: 19 September 2022
' '
space
\f
formfeed
\n
newline
\r
carriage return
\t
horizontal tab
\v
vertical tab
Updated: 14 September 2022
An encoding, e.g. UTF-8, defines a mapping between bytes and text.
Updated: 06 June 2023