A Triva question.
What is the easy way to remove the double quotes in the file in the following format.
"asdfa","fdgh","qwer"
tr -d '\"' <filename >newfilename
mv newfilename oldfilename
This need to be handled in a script. Any better way to do this. Will sed be more effecient?
One... (3 Replies)
Hi,
Could you please help me in removal of newline chracter present in between the double quotes and replacing it with space.
For example ...
Every field is wrapped with double quotes with comma delimiter, so I need to travese from first double quote occerence to till second double... (7 Replies)
How to remove characters enclosed in single quotes?
My data is something like this
(03/22/2011 08:17:26.650) : ( -> '1' -> '1-1-3' -> '6' -> '1' -> 'SALMOR58BB4' aaaaa bbbbbb ccccc ((dddd))
I want the output to be
(03/22/2011 08:17:26.650) : ( -> -> -> -> -> aaaaa... (2 Replies)
I would like to know how to replace a space delimiter with a ^_ (\037) delimiter and a double quote delimiter while maintaining the spaces inside the double quotes. The double quote delimiter is only used on text fields.
I'd prefer a one-liner, but could handle a function or script that accepts... (4 Replies)
Hi Guys,
I have a file with content as below
aj.txt
"Iam
allfine" abcdef
abcd "all is
not well"
What I'm trying to say is my data has some new line characters in between quoted text. I must get ride of the newline character that comes in between the quoted text.
output must be:... (8 Replies)
Hi,
I am little new to forum and new on unix side. I have a small issue below:
I am reading a file that has 5 columns something like below.
col1,col2,col3,col4,col5
Some records are having double quoted values something like below:
"value1","value2","value3","value4","value5"
I need... (8 Replies)
Okay, I would like to delete all the commas in a .CSV file (TEST.CSV) or at least substitute them with empty space, that are enclosed in double quote.
Please see the sample file as below:
column 1,column 2,column 3,column 4,column 5,column 6,column 7,column 8,column 9,column 10... (8 Replies)
I have file with are delimited by pipe(|) symbol, I wanted those to be removed except the ones which are enclosed in double quotes.
If your quote file is:
|Life is |Beautiful"|"Indeed life |is beautiful too|"|"But unix is fun| is not"|"
It should return:
Life is Beautiful"|"Indeed life is... (1 Reply)
I have file with are delimited by pipe(|) symbol, I wanted those to be removed except the ones which are enclosed in double quotes.
If your quote file is:
|Life is |Beautiful"|"Indeed life |is beautiful too|"|"But unix is fun| is not"|"
It should return:
Life is Beautiful"|"Indeed life is... (9 Replies)
Hi,
I've a requirement like, in a csv file of 30+ fields where all the columns are having double quotes I need to remove the double quotes from certain fields and certain field should remain as it is.
Eg:... (6 Replies)
Discussion started by: Krishnanth S
6 Replies
LEARN ABOUT CENTOS
setfattr
SETFATTR(1) File Utilities SETFATTR(1)NAME
setfattr - set extended attributes of filesystem objects
SYNOPSIS
setfattr [-h] -n name [-v value] pathname...
setfattr [-h] -x name pathname...
setfattr [-h] --restore=file
DESCRIPTION
The setfattr command associates a new value with an extended attribute name for each specified file.
OPTIONS -n name, --name=name
Specifies the name of the extended attribute to set.
-v value, --value=value
Specifies the new value of the extended attribute. There are three methods available for encoding the value. If the given string is
enclosed in double quotes, the inner string is treated as text. In that case, backslashes and double quotes have special meanings and
need to be escaped by a preceding backslash. Any control characters can be encoded as a backslash followed by three digits as its ASCII
code in octal. If the given string begins with 0x or 0X, it expresses a hexadecimal number. If the given string begins with 0s or 0S,
base64 encoding is expected. See also the --encoding option of getfattr(1).
-x name, --remove=name
Remove the named extended attribute entirely.
-h, --no-dereference
Do not follow symlinks. If pathname is a symbolic link, it is not followed, but is instead itself the inode being modified.
--restore=file
Restores extended attributes from file. The file must be in the format generated by the getfattr command with the --dump option. If a
dash (-) is given as the file name, setfattr reads from standard input.
--version
Print the version of setfattr and exit.
--help
Print help explaining the command line options.
-- End of command line options. All remaining parameters are interpreted as file names, even if they start with a dash character.
AUTHOR
Andreas Gruenbacher, <a.gruenbacher@bestbits.at> and the SGI XFS development team, <linux-xfs@oss.sgi.com>.
Please send your bug reports or comments to these addresses.
SEE ALSO getfattr(1), and attr(5).
Dec 2001 Extended Attributes SETFATTR(1)