Sponsored Content
Top Forums UNIX for Dummies Questions & Answers sed 's/~/\^J/g' how to get "^J" on same line as rest of the command. Post 4150 by psyjoniz on Thursday 19th of July 2001 12:34:32 PM
Old 07-19-2001
well, the only other thing i can think of without actually working on it myself is to either try substituting the '^J' with a '^M' (escaping it of course - '\^\M') OR... and this may be a long shot - try double escaping it - '\\^\\J' or '\\^\\M' - that MIGHT work... (reason being is if you are calling it from a call....hence the double escaping)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

what is the 'whatis' command?

I am kind of new with Unix and I really need some help. Can you please tell me what the 'whatis' command is? and what does it do? Let's say that I have a file which I want to delete, what command will I need to use? If I have a directory that I want to delete all files from what command do... (11 Replies)
Discussion started by: mischiefdemon
11 Replies

2. UNIX for Dummies Questions & Answers

'find' command question

my solaris text talks about the 'find' command... it further goes to talk about an "action" used with the find command. I am completely confused as to what the {} do with the find comand. the explanation is this: "A set of braces, {}, delimits where the file name is passed to the command from... (2 Replies)
Discussion started by: xyyz
2 Replies

3. Shell Programming and Scripting

Clearify what it means under 'WHAT' when hit the 'w'-command

I wonder how I shall read the result below, especially 'what' shown below. The result was shown when I entered 'w'. E.g what is TOP? What is gosh ( what does selmgr mean?)? login@ idle JCPU PCPU what 6:15am 7:04 39 39 TOP 6:34am 6:45 45 45 TOP 6:41am ... (1 Reply)
Discussion started by: Aelgen
1 Replies

4. UNIX for Dummies Questions & Answers

i don't understand the "sort" command

i have been trying to understand this chapter titled "Searching for Files and Text" for a few weeks now. unfortunately, this chapter is one of those things, that no matter how hard you try and how long you try for, you are incapable of understanding (at least in my case) this entire chapter,... (2 Replies)
Discussion started by: xyyz
2 Replies

5. Filesystems, Disks and Memory

Why i can't use the tool "turbosoundcfg" to configure the sound in my TurboLinux?

But the page "http://www.chinalinuxpub.com/doc/tlc61/node60.html" says it can.Why ?What can i do? Help me ! Thanks a lot! (3 Replies)
Discussion started by: sensir163
3 Replies

6. UNIX for Dummies Questions & Answers

quoting echo 'it's friday'

echo 'it's friday' why appear the > (3 Replies)
Discussion started by: yls177
3 Replies

7. Programming

Couldn't compile the simple "Hello World"

So, this is my first C++ program under linux. My OS is Red Hat 8.0, and my codes are like following: $vi hello.cpp #include <iostream> using namespace std; int main() { cout << "Hello World!" << endl; return 0; } $ g++ -o hello hello.cpp the error message are: ... (3 Replies)
Discussion started by: HOUSCOUS
3 Replies

8. UNIX for Advanced & Expert Users

How to remove a file with a leading dash '-' in it's name?

Somehow someone created a file named '-ov' in the root directory. Given the name, the how was probably the result of some cpio command they bozo'ed. I've tried a number of different ways to get rid of it using * and ? wildcards, '\' escape patterns etc.. They all fail with " illegal option --... (3 Replies)
Discussion started by: GSalisbury
3 Replies

9. Shell Programming and Scripting

What are the differences between 'bash' and 'sh'

Hopefully this doesn't come off as too much of a "newbie" question or a flamebait. But I have recently begun working with a Sun Solaris box after having spent the past five years working with RedHat. From what i can tell, thing look fairly similar and the 'man' command is some help. But I've... (7 Replies)
Discussion started by: deckard
7 Replies

10. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
SYSTEMD-ESCAPE(1)						  systemd-escape						 SYSTEMD-ESCAPE(1)

NAME
systemd-escape - Escape strings for usage in systemd unit names SYNOPSIS
systemd-escape [OPTIONS...] [STRING...] DESCRIPTION
systemd-escape may be used to escape strings for inclusion in systemd unit names. The command may be used to escape and to undo escaping of strings. The command takes any number of strings on the command line, and will process them individually, one after another. It will output them separated by spaces to stdout. By default, this command will escape the strings passed, unless --unescape is passed which results in the inverse operation being applied. If --mangle is given, a special mode of escaping is applied instead, which assumes the string is already escaped but will escape everything that appears obviously non-escaped. For details on the escaping and unescaping algorithms see the relevant section in systemd.unit(5). OPTIONS
The following options are understood: --suffix= Appends the specified unit type suffix to the escaped string. Takes one of the unit types supported by systemd, such as "service" or "mount". May not be used in conjunction with --template=, --unescape or --mangle. --template= Inserts the escaped strings in a unit name template. Takes a unit name template such as foobar@.service. May not be used in conjunction with --suffix=, --unescape or --mangle. --path, -p When escaping or unescaping a string, assume it refers to a file system path. This eliminates leading, trailing or duplicate "/" characters and rejects "." and ".." path components. This is particularly useful for generating strings suitable for unescaping with the "%f" specifier in unit files, see systemd.unit(5). --unescape Instead of escaping the specified strings, undo the escaping, reversing the operation. May not be used in conjunction with --suffix=, --template= or --mangle. --mangle Like --escape, but only escape characters that are obviously not escaped yet, and possibly automatically append an appropriate unit type suffix to the string. May not be used in conjunction with --suffix=, --template= or --unescape. -h, --help Print a short help text and exit. --version Print a short version string and exit. EXAMPLES
To escape a single string: $ systemd-escape 'Hallochen, Meister' Hallxc3xb6chenx2cx20Meister To undo escaping on a single string: $ systemd-escape -u 'Hallxc3xb6chenx2cx20Meister' Hallochen, Meister To generate the mount unit for a path: $ systemd-escape -p --suffix=mount "/tmp//waldi/foobar/" tmp-waldi-foobar.mount To generate instance names of three strings: $ systemd-escape --template=systemd-nspawn@.service 'My Container 1' 'containerb' 'container/III' systemd-nspawn@Myx20Containerx201.service systemd-nspawn@containerb.service systemd-nspawn@container-III.service EXIT STATUS
On success, 0 is returned, a non-zero failure code otherwise. SEE ALSO
systemd(1), systemd.unit(5), systemctl(1) systemd 237 SYSTEMD-ESCAPE(1)
All times are GMT -4. The time now is 04:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy