Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Filter valid hexadecimal color codes Post 303045968 by vgersh99 on Monday 20th of April 2020 11:14:09 AM
Old 04-20-2020
I don't know either...
Most likely because you're using Extended RegEx without telling grep to do so (-E)
could you provide a sample file and a desired output (as always)?
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Using color escape codes in less

Hi all, Not sure how "for dummies" this question is, but I'd better use understatement... A. My Environment ============== I am using RedHat Linux, version 2.6.18-53.el5. When I type less --version I get: less 394 Copyright (C) 1984-2005 Mark Nudelman ... My terminal is configured... (1 Reply)
Discussion started by: Source2Exe
1 Replies

2. UNIX for Dummies Questions & Answers

Regular expression on hex color codes

I want to have all hex color codes in a given stylesheet in uppercase, so #fff should be converted to #FFF for instance. Here is the regular expression I use to match and convert hex color codes to uppercase: sed -e 's/^#({3}$)|({6}$)/^#({3}$)|({6}$)/' main.css However, no conversion to uppercase... (6 Replies)
Discussion started by: figaro
6 Replies

3. Programming

Using ANSI color codes in gcc compiled program

I have put some yellow color codes and works well. I call the funstion using print_usage(stderr, 0); I would like to know if there is any way, to store the ansi color codes in variables and then call them inside fprintf. Or have a format followed by the strings I want to output. ... (5 Replies)
Discussion started by: kristinu
5 Replies

4. UNIX for Dummies Questions & Answers

Display file with escaped color codes

Hi, I have a file containing color codes: Fri May 25 17:13:04 2012: Starting MTA: exim4^ Loading cpufreq kernel modules...^How can I display it colorized on a linux terminal? (4 Replies)
Discussion started by: ripat
4 Replies

5. Shell Programming and Scripting

Help with awk color codes based on condition

HI i have two files say test and test1 Test.txt Code: Lun01 2TB 1.99TB 99.6% Lun02 2TB 1.99TB 99.5% Lun03 2TB 1.99TB 99.5% Lun04 2TB 1.55TB 89.6% Code: Test1.txt Lun01 2TB 1.99TB 89.5% Lun02 2TB 1.99TB 99.5% Lun03 2TB 1.99TB 99.5% Requirement is to compare... (6 Replies)
Discussion started by: venkitesh
6 Replies

6. Shell Programming and Scripting

Filter Data based on codes

Hello, I have a question on how to filter the data on multiple columns. The problem is I have one table with 25 columns, 4500 rows. I need to filter out the data based on some codes like 'XXXX', I have 25 codes to check on that table. My requirement is that which ever row has this code I... (1 Reply)
Discussion started by: sandeep309
1 Replies
delproplist(3)						     Library Functions Manual						    delproplist(3)

NAME
delproplist, fdelproplist - Removes Extended File Attributes from a file SYNOPSIS
#include <sys/proplist.h> int delproplist ( char *path, int follow, struct proplistname_args *args ); int fdelproplist ( int fd, struct proplistname_args *args ); PARAMETERS
Points to a file whose Extended File Attributes are to be removed from its Property List. If non-zero, specifies that if the last component in *path is a symbolic link, then the link should be traversed. Points to the proplistname_args structure, defined in sys/proplist.h, that contains the following members: pl_mask Contains system-wide Extended File Attributes. Note that if you are deleting all the Extended File Attributes of a file, pl_mask must equal PLE_FLAG_ALL defined in sys/proplist.h. Also, if you are deleting Extended File Attribute flags that match certain system-wide Extended File Attributes, the value of pl_mask should be formed by ORing the desired values of the system-wide Extended File Attributes. pl_numnames Contains the number of Extended File Attributes names held in the names array, pl_names. pl_names Contains a counted array of Extended File Attribute names. Note that the Extended File Attribute names are null terminated ASCII strings and that the last element of the array must be a null pointer. Also, a null array pointer indicates all Extended File Attributes. Specifies a file descriptor that points to a file whose Extended File Attributes are to be removed from its Property List. This parameter is used with the fdelproplist function. DESCRIPTION
The delproplist function removes one or more Extended File Attributes, whose names are specified in the structure pointed to by *args, from the Property List of the file pointed to by *path. An Extended File Attribute is a name and value pair that is contained in a variable- sized structure called a Property List. A Property List is part of a file's metadata and can contain abstract name and value pairs (Extended File Attributes) that can be set either by the operating system (for example, ACLs and privileges) or by a user-level application (for example, PC File Attributes). Note that if you specify a non-existent Extended File Attribute name, the function will return success- fully. The fdelproplist function behaves the same as delproplist, except that it operates on a file descriptor rather than a pointer to a file. RESTRICTIONS
If a system failure occurs when the Extended File Attributes are being removed from disk, one of the three following conditions may apply to each Extended File Attribute, since there are no ordering guarantees when several Extended File Attributes are being updated: The Extended File Attribute was not removed from the disk. The Extended File Attribute was removed from the disk. EXAMPLES
#include <sys/proplist.h> main() { char *ptr, *buf, *name, *value; int *value_len, *flags, buffer_size, min_buffer_size, ret, nbytes; struct pro- plistname_args entry_names; static char *names[] = { "primary_name", "secondary_name", "" }; . . . /* * Delete the property list entries */ if (delproplist("/tmp/foo", 1, entry_names)) perror("delproplist"); free(buf); } RETURN VALUES
If successful, zero is returned, the specified Extended File Attribute is deleted from disk, and the change time of the file pointed to by *path is marked for update. If unsuccessful, the integer -1 is returned and errno is set to indicate the error. ERRORS
In addition to errors associated with open(2), the function will fail if: Search permission was denied for a directory in *path. The calling program was not the owner of the file and the process does not have the appropriate system privilige. A problem was encountered with the Extended File Attribute name. A problem was encountered with the Extended File Attribute name. There was an error reading or writing some portion of the Property List. The Extended File Attribute could not be associated with the file pointed to by *path. The calling program did not have the appropriate system privilige to access the requested Extended File Attribute, for example, DEC_AUDIT_PROPLISTFLAG. The file system is mounted read-only. RELATED INFORMATION
Functions: open(2), add_proplist_entry(3), delproplist(3), fdelproplist(3), fgetproplist(3), fsetproplist(3), get_proplist_entry(3), get- proplist(3), setproplist(3), sizeof_proplist_entry(3). Files: proplist(4), sys/proplist.h. delim off delproplist(3)
All times are GMT -4. The time now is 10:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy