My boss came to me with a question about how to embed a CRLF sequence into his shell script (for piping through some sort of netcat or telnet stuff he's doing) in a reasonably portable and robust way.
How do I embed CRLF or other unprintable characters in my shell script?
958 Views Asked by Jim Dennis At
2
There are 2 best solutions below
Related Questions in SHELL
- passing text with \n as one argument in shell
- Delete the extra space after special character in all the lines of text file
- Calling a python function with options from shell script
- bc: prevent "divide by zero" runtime error on multiple operations
- schedule and automate sqoop import/export tasks
- How can launch an external process from java and still be able to interact with this process?
- Linux find files where mtime and ctime are not equal
- Find all files contained into directory named
- Quick way to remove all folders titled CVS in a directory and it's subdirectories?
- shell process not exiting on `exit` inside `$()`
- How to set environment variables with a forward slash in the key
- System 'bash -ic' stuck when I hit ctrl+c
- bash functions returns "command not found"
- Why does pattern "*.so?(.*)" produce a syntax error in a script but not on command line?
- retrieve plaintext password from file using bash command
Related Questions in WHITESPACE
- How do I wrap text in a pre tag for Internet explorer?
- Perl and Regex - single line mode matching
- How to enter an escape sequence when using ProcessBuilder to open Windows file explorer and highlight the file?
- Removing space in dataframe python
- disable whitespace checks for C++ files in vim syntastic
- Whitespaces in a TextView
- Javascript - Remove space- not breaks
- Unwanted Space Between <header> and <nav>
- How to find out what's adding whitespace on a web page?
- Can't call system with white space in parameter
- Remove space from a filename
- Regex in xCode: any number of any whitespace characters including "end of line"?
- White spaces getting removed on generating csv files from HTML dropdown list
- Beyond Compare 3.3.10 ignores checkboxes for 'leading whitespace" and "embedded whitespace"
- Preserving Tab-Space with XSL-FO
Related Questions in SH
- How to export multiple files to database using shell script?
- Printing a newline
- Why is rpmbuild installing package?
- POSIX Shell backslash confusion
- Create .sh file
- Linux - sh script - download multiple files from FTP
- Get the value of a variable whose name consists of a variable itself
- Different behaviour of compiler when called in script by LaunchControl
- Is the following snippet valid Bourne shell code?
- Storing data in shell
- shell command to skip file in sequence
- sort on pipe-delimited fields not behaving as expected
- Redirect stdout using exec in subscript
- Increment of multiple file prefixes?
- Executing GUI .sh file with Osx
Related Questions in NON-PRINTING-CHARACTERS
- Replacing all occurrences of non-printable character in a file using its ascii value
- In Java I need to convert an XML Document to a string, with non-printable characters in data as hex
- ASP.NET Pass non-printable barcode character from a web.form to server side
- serialization ArrayList Java
- Python replace unprintable characters except linebreak
- String at specific address with non-printable ASCII values
- How do I embed CRLF or other unprintable characters in my shell script?
- How to show ascii non-printable characters in Visual Studio Code?
- Is there a font or (better!) set of unicode characters representing the numbers 0-255 for displaying ASCII character codes (or other uses)?
- Service/App for viewing a Webpage as hex straight off the wire?
- Remove special characters from data frame
- Removing non-printable characters with sed not working
- Scriptella Change delimiter of csv to tab
- Is it possible to echo some non-printable characters in batch/cmd?
- Remove non printable string
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
My suggestion for him:
... but I'm open to other comments. It's certainly fine with modern versions of GNU
trandbash.