Sponsored Content
Full Discussion: sed Ampersand
Top Forums Shell Programming and Scripting sed Ampersand Post 302872627 by MadeInGermany on Friday 8th of November 2013 09:59:44 PM
Old 11-08-2013
Quote:
Originally Posted by elixir_sinari
In the regex (pattern) part, not the replacement part. I think.
Yes, I have already deleted that from my post.
This User Gave Thanks to MadeInGermany For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ampersand

What is the & for in Unix?? say for example that you have a line in a shellscript that will startup a executable and you have the ampersand at the end of the line, what is it for?? any info you could spare would be much appreciated thanks in advance (1 Reply)
Discussion started by: eloquent99
1 Replies

2. Programming

The Ampersand

In my program, I'm using argc and argv to accept command line arguments. However, if I have to get the '&' to work i.e. make it run the child as a background process, do I have to write some special code in C or does Unix handle it automatically? If I have to add the special code, how does it look... (2 Replies)
Discussion started by: Legend986
2 Replies

3. UNIX for Dummies Questions & Answers

mailx - mail ti ids containing ampersand

Hi I am trying to send mail to an email id having ampersand in it. Like abc.&.xyz@abc.com But it is not being sent. I also tried prefixing backslash before and after ampersand Need Help:( (17 Replies)
Discussion started by: aniruddha.saha
17 Replies

4. Shell Programming and Scripting

Understanding ampersand (&) usage in the command

Please explain the usage of ampersand in the following command who & echo "Total number of users are `who|wc -l`" What I understand is that ampersand is used to run some process in the background. And, what I am expecting from this command is "Output of who should be displayed on the... (2 Replies)
Discussion started by: Shan_u2005
2 Replies

5. UNIX for Dummies Questions & Answers

Ampersand usage and Emacs

In the terminal, using the ampersand allows the process to run in the background--Emacs, for example. But is there a way to automatically open Emacs as a background process so I can still use the command line? Typing the ampersand is just annoying to me, and I keep forgetting; it's just too useful... (0 Replies)
Discussion started by: Zucriy Amsuna
0 Replies

6. Shell Programming and Scripting

Help with using lynx/wget/curl when a link has an ampersand

Hi, for my own interest I want to scrape a lot of data off the Maple Story game rankings page. The problem is, when I want to get the data at this page maplestory(dot)nexon(dot)net/Rankings/OverallRanking.aspx?type=overall&s=&world=0&job=0&pageIndex=6 It gives me the data at this page ... (3 Replies)
Discussion started by: seagaia
3 Replies

7. Shell Programming and Scripting

Cannot get literal ampersand to display in SQL output

Gurus, Thanks so much for your help, in advance. I'm using ksh and outputting a literal string value to an output file, however, Unix isn't playing by SQL's rules. The ampersand character which I'm trying to disply as a knowledge base link is screwing up the output. Typically, the "&&" is... (1 Reply)
Discussion started by: WhoDatWhoDer
1 Replies

8. Shell Programming and Scripting

Problems with ampersand (&) in sed command

Hello everybody, I have a Problem with sed command. I want to replace a defined string with a string from a database field (dynamic). e.g. sed -i -e 's/%NAME%/'"$HNAME"'/g' The Problem is that the $HNAME variable can contain Special characters like '&' e.g. HNAME="AH Kruger & Co. KG" ... (1 Reply)
Discussion started by: Bambuti2000
1 Replies

9. UNIX for Beginners Questions & Answers

Gawk Escaping Ampersand

I would like to open a text m3u file and add the same string to the beginning of each line. I think I am close, but I cannot figure out how to escape the ampersand in the following code: gawk-3.1.6.exe "{print /var/media/Music2.0TB2.1USB/Audio Files/Music/Rock & Roll/ $0}" "L:\Music\Rock &... (7 Replies)
Discussion started by: WarpLover
7 Replies

10. Red Hat

Nohup with ampersand & process gets disconnected

For years I have spawned shell scripts with nohup and ampersand and they run whether or not I stay logged in. Recently a client told us that we had to set a keep alive timeout on all of our Redhat 7.6 Linux servers. Our sysadmin set the following parameters in the sshd_config file on all of our... (10 Replies)
Discussion started by: gandolf989
10 Replies
RE_COMP(3)						     Linux Programmer's Manual							RE_COMP(3)

NAME
re_comp, re_exec - BSD regex functions SYNOPSIS
#define _REGEX_RE_COMP #include <sys/types.h> #include <regex.h> char *re_comp(const char *regex); int re_exec(const char *string); DESCRIPTION
re_comp() is used to compile the null-terminated regular expression pointed to by regex. The compiled pattern occupies a static area, the pattern buffer, which is overwritten by subsequent use of re_comp(). If regex is NULL, no operation is performed and the pattern buffer's contents are not altered. re_exec() is used to assess whether the null-terminated string pointed to by string matches the previously compiled regex. RETURN VALUE
re_comp() returns NULL on successful compilation of regex otherwise it returns a pointer to an appropriate error message. re_exec() returns 1 for a successful match, zero for failure. ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). +---------------------+---------------+-----------+ |Interface | Attribute | Value | +---------------------+---------------+-----------+ |re_comp(), re_exec() | Thread safety | MT-Unsafe | +---------------------+---------------+-----------+ CONFORMING TO
4.3BSD. NOTES
These functions are obsolete; the functions documented in regcomp(3) should be used instead. SEE ALSO
regcomp(3), regex(7), GNU regex manual COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU
2017-09-15 RE_COMP(3)
All times are GMT -4. The time now is 08:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy