Sponsored Content
Full Discussion: Gawk Escaping Ampersand
Top Forums UNIX for Beginners Questions & Answers Gawk Escaping Ampersand Post 302997051 by jim mcnamara on Saturday 6th of May 2017 07:49:14 PM
Old 05-06-2017
aia - not sure. But space concatenates the $0, a comma will put a space in there which, if that first quoted section is some kind of filename might be a problem.
 

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

sed Ampersand

I want to add the character "<" to the end of each line of input using the & function in SED. Something like: sed 's/.*/&\</' It's important to use the &, not another method, because I want to know what I'm doing wrong. Thanks (5 Replies)
Discussion started by: rlopes
5 Replies

9. 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

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
audit_submit(3) 					   BSD Library Functions Manual 					   audit_submit(3)

NAME
audit_submit -- general purpose audit record submission LIBRARY
Basic Security Module Library (libbsm, -lbsm) SYNOPSIS
#include <bsm/libbsm.h> int audit_submit(short au_event, au_id_t auid, char status, int reterr, const char * restrict format, ...); DESCRIPTION
The audit_submit() function provides a generic programming interface for audit record submission. This audit record will contain a header, subject token, an optional text token, return token, and a trailer. The header will contain the event class specified by au_event. The sub- ject token will be generated based on auid. The return token is dependent on the status and reterr arguments; unlike the argument to au_to_return, reterr should be a local rather than BSM error number. Optionally, a text token will be created as a part of this record. Text token output is under the control of a format string that specifies how subsequent arguments (or arguments accessed via the variable- length argument facilities of stdarg(3)) are converted for output. If format is NULL, then no text token is created in the audit record. It should be noted that audit_submit() assumes that setaudit(2), or setaudit_addr(2) has already been called. As a direct result, the termi- nal ID for the subject will be retrieved from the kernel via getaudit(2), or getaudit_addr(2). EXAMPLES
#include <bsm/audit.h> #include <bsm/libbsm.h> #include <bsm/audit_uevents.h> #include <stdio.h> #include <stdarg.h> #include <errno.h> void audit_bad_su(char *from_login, char *to_login) { struct auditinfo_addr aia; struct auditinfo ai; au_id_t aid; int error; error = getaudit_addr(&aia, sizeof(aia)); if (error < 0 && errno == ENOSYS) { error = getaudit(&ai); if (error < 0) err(1, "getaudit"); aid = ai.ai_auid; } else if (error < 0) err(1, "getaudit_addr"); else aid = aia.ai_auid; error = audit_submit(AUE_su, aid, EPERM, 1, "bad su from %s to %s", from_login, to_login); if (error != 0) err(1, "audit_submit"); } Will generate the following audit record: header,94,1,su(1),0,Mon Apr 17 23:23:59 2006, + 271 msec subject,root,root,wheel,root,wheel,652,652,0,0.0.0.0 text,bad su from from csjp to root return,failure : Operation not permitted,1 trailer,94 RETURN VALUES
If successful, audit_submit will return zero. Otherwise a -1 is returned and the global variable errno is set to indicate the error. SEE ALSO
auditon(2), getaudit(2), libbsm(3), stdarg(3) HISTORY
The audit_submit() function first appeared in OpenBSM version 1.0. OpenBSM 1.0 was introduced in FreeBSD 7.0. AUTHORS
The audit_submit() function was written by Christian S.J. Peron <csjp@FreeBSD.org>. BSD
January 18, 2008 BSD
All times are GMT -4. The time now is 06:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy