Sponsored Content
Full Discussion: wildcard for spaces
Top Forums UNIX for Dummies Questions & Answers wildcard for spaces Post 10643 by Perderabo on Monday 19th of November 2001 08:35:32 AM
Old 11-19-2001
I think that
sed 's/,1/,2/'
is all you need.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Find wildcard .shtml files in wildcard directories and removing them- How's it done?

I'm trying to figure out how to build a small shell script that will find old .shtml files in every /tgp/ directory on the server and delete them if they are older than 10 days... The structure of the paths are like this: /home/domains/www.domain2.com/tgp/ /home/domains/www.domain3.com/tgp/... (1 Reply)
Discussion started by: Neko
1 Replies

2. Shell Programming and Scripting

Strip leading and trailing spaces only in a shell variable with embedded spaces

I am trying to strip all leading and trailing spaces of a shell variable using either awk or sed or any other utility, however unscuccessful and need your help. echo $SH_VAR | command_line Syntax. The SH_VAR contains embedded spaces which needs to be preserved. I need only for the leading and... (6 Replies)
Discussion started by: jerardfjay
6 Replies

3. UNIX for Dummies Questions & Answers

how to append spaces(say 10 spaces) at the end of each line based on the length of th

Hi, I have a problem where I need to append few spaces(say 10 spaces) for each line in a file whose length is say(100 chars) and others leave as it is. I tried to find the length of each line and then if the length is say 100 chars then tried to write those lines into another file and use a sed... (17 Replies)
Discussion started by: prathima
17 Replies

4. Shell Programming and Scripting

wildcard

Hi, I have this code to search all "cif" files using wildcard for file in *.cif do grep "Uiso" $file | awk '{ print $3, $4, $5 }' > tet done I get this error "grep: *.cif: No such file or directory" Please where am I going wrong!!! Thank you in advance (6 Replies)
Discussion started by: princessotes
6 Replies

5. Shell Programming and Scripting

Removing blank spaces, tab spaces from file

Hello All, I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out. My file is like this (<b> means one blank space, <t> means one tab space)- $ cat file NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
Discussion started by: NARESH1302
3 Replies

6. Shell Programming and Scripting

How to use wildcard * in if?

Hi, Can anyone help me how to use * in if statement. File contains below line1:a|b|c|Apple-RED| line2:c|d|e|Apple-Green| line3:f|g|h|Orange| I need to find line by line 4th field contains 'Apple' or not. Please help me at the earliest. (6 Replies)
Discussion started by: jam_prasanna
6 Replies

7. Shell Programming and Scripting

Wildcard in ls

Hi Experts, I want to use ls in the below form: ls -l *.{txt,TXT} (working fine) but when i am declaring a variable, VAR="*.{txt,TXT}" ls -l $VAR is not working. Please help. Thanks. (4 Replies)
Discussion started by: sugarcane
4 Replies

8. OS X (Apple)

Help with wildcard

CD_numb is AM017 this code: set the_Firstcom_CD to (do shell script "ls -d '/volumes/audioNAS/Firstcom/Access Music/' ") & CD_numb gives me this: "/volumes/audioNAS/Firstcom/Access Music/AM017" the item I am looking for is AM017Q. I can get the "*" syntax right so it never finder... (7 Replies)
Discussion started by: sbrady
7 Replies

9. Shell Programming and Scripting

Expanding a list of wildcard filenames with spaces

I think I must be missing something obvious but I have a file containing a list of files and paths, some with wildcard, others with spaces. e.g. /this/is/a/file /this/is/a/directory/ /this/is/a/collection/* /this/has spaces/in/it /this/had spaces/and/list/of/files*... (6 Replies)
Discussion started by: mij
6 Replies

10. Shell Programming and Scripting

How to list and move files with spaces and wildcard?

I am writing a code that can move and archve all the files in a directory except the latest file based on file pattern provided in a controlfile. The filename is in the form of pattern. So basically we find the all the files of the pattern provided and archive all of them, leaving one latest file.... (3 Replies)
Discussion started by: Saanvi1
3 Replies
AUSEARCH_ADD_expression(3)					  Linux Audit API					AUSEARCH_ADD_expression(3)

NAME
ausearch_add_expression - build up search expression SYNOPSIS
#include <auparse.h> int ausearch_add_expression(auparse_state_t *au, const char *expression, char **error, ausearch_rule_t how); DESCRIPTION
ausearch_add_item adds an expression to the current audit search expression. The search conditions can then be used to scan logs, files, or buffers for something of interest. The expression parameter contains an expression, as specified in ausearch-expression(5). The how parameter determines how this search expression will affect the existing search expression, if one is already defined. The possi- ble values are: AUSEARCH_RULE_CLEAR Clear the current search expression, if any, and use only this search expression. AUSEARCH_RULE_OR If a search expression E is already configured, replace it by (E || this_search_expression). AUSEARCH_RULE_AND If a search expression E is already configured, replace it by (E && this_search_expression). RETURN VALUE
If successful, ausearch_add_expression returns 0. Otherwise, it returns -1, sets errno and it may set *error to an error message; the caller must free the error message using free(3). If an error message is not available or can not be allocated, *error is set to NULL. SEE ALSO
ausearch_add_item(3), ausearch_add_interpreted_item(3), ausearch_add_timestamp_item(3), ausearch_add_regex(3), ausearch_set_stop(3), ause- arch_clear(3), ausearch_next_event(3), ausearch-expression(5). AUTHOR
Miloslav Trmac Red Hat Feb 2008 AUSEARCH_ADD_expression(3)
All times are GMT -4. The time now is 07:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy