I have a csv file with lines like the followings
123456,"ABC CO., LTD","XXX"
789012,"DEF LIMITED", "XXX"
before I bcp this file to database, the comma in "CO.," need to be removed first.
My script is cat <filename> | sed 's/"CO.,"/"CO."/g'
but it doesn't work. Can anyone here able to... (2 Replies)
How can I print exactly what I want in between my quotes? I have xml that I want to echo exactly and it is not printing out the brackets and gets hung up at the "<?" and all that. Is there a way I can just say echo exactly between these quotes? (2 Replies)
Hi,
I have a requirement to replace the comma's inside the double quotes. The comma's inside the double quotes will get changed dynamically.
Input Record:
"Washington, DC,Prabhu,aju",New York
Output Record:
"Washington| DC|Prabhu|aju",New York
I tried with the below command but it... (3 Replies)
Hi, all
I need to get fields in a line that are separated by commas, some of the fields are enclosed with double quotes, and they are supposed to be treated as a single field even if there are commas inside the quotes.
sample input:
for this line, 5 fields are supposed to be extracted, they... (8 Replies)
Hello there,
I have a comma separated csv , and all the text field is wrapped by double quote. Issue is some text field contain comma as well inside double quote. so it is difficult to process.
Input in the csv file is ,
1,234,"abc,12,gh","GH234TY",34
I need output like below,... (8 Replies)
I need to use something bash related to remove everything inside of brackets.
For example. In the following:
abc<def>ghi<jkl>mno
the result should be:
abcghimno (4 Replies)
I,
I have a file and i need to replace comma and blank space with comma and 0.
cat file.txt
a,5
b,1
c,
d,
e,4
I need the output as
cat file.txt
a,5
b,1
c,0
d,0 (4 Replies)
Hi Experts,
Please support
I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6.
... (3 Replies)
Please use code tags
Hi,
I have input data is below format and n of column in the multiple flat files. the string data has any double quotes(") values replaced to double double quotes for all the columns{"").
Also, my input flat file each column string data has carriage of new line too.... (14 Replies)
Hi,
I have below requirement.
Apple
Orange
Banana
Required O/p in bash
'Apple,Orange,Banana'
Can you please help.
Please wrap your samples, codes in CODE TAGS as per forum rules. (3 Replies)
Discussion started by: Rtk
3 Replies
LEARN ABOUT CENTOS
clubak
CLUBAK(1) ClusterShell User Manual CLUBAK(1)NAME
clubak - format output from clush/pdsh-like output and more
SYNOPSIS
clubak [ OPTIONS ]
DESCRIPTION
clubak formats text from standard input containing lines of the form "node:output". It is fully backward compatible with dshbak(1) but
provides additonal features. For instance, clubak always displays its results sorted by node/nodeset.
You do not need to use clubak when using clush(1) as all output formatting features are already included in. It is provided for other
usages, like post-processing results of the form "node:output".
Like clush(1), clubak uses the ClusterShell.MsgTree module of the ClusterShell library (see pydoc ClusterShell.MsgTree).
INVOCATION
clubak should be started with connected standard input.
OPTIONS --version
show clubak version number and exit
-b, -c gather nodes with same output (-c is provided for dshbak(1) compatibility)
-d, --debug
output more messages for debugging purpose
-L disable header block and order output by nodes
-r, --regroup
fold nodeset using node groups
-s GROUPSOURCE, --groupsource=GROUPSOURCE
optional groups.conf(5) group source to use
-G, --groupbase
do not display group source prefix (always @groupname)
-S SEPARATOR, --separator=SEPARATOR
node / line content separator string (default: :)
-F, --fast
faster but memory hungry mode (preload all messages per node)
-T, --tree
message tree trace mode; switch to enable ClusterShell.MsgTree trace mode, all keys/nodes being kept for each message element of the
tree, thus allowing special output gathering
--color=WHENCOLOR
whether to use ANSI colors to surround node or nodeset prefix/header with escape sequences to display them in color on the terminal.
WHENCOLOR is never, always or auto (which use color if standard output refers to a terminal). Color is set to [34m (blue foreground
text) and cannot be modified.
--diff show diff between gathered outputs
EXIT STATUS
An exit status of zero indicates success of the clubak command.
EXAMPLES
1. clubak can be used to gather some recorded clush(1) results:
Record clush(1) results in a file:
# clush -w node[1-7] uname -r >/tmp/clush_output
# clush -w node[32-159] uname -r >>/tmp/clush_output
Display file gathered results (in line-mode):
# clubak -bL </tmp/clush_output
2. Another example, iterate over node* text files in current directory and gather characters count for all of them:
# find -name "node*" -exec wc -c {} ; | awk '{ gsub("./","",$2); print $2": "$1 }' | clubak -bL
node[1,3]: 7
node2: 9
SEE ALSO clush(1), nodeset(1), groups.conf(5).
BUG REPORTS
Use the following URL to submit a bug report or feedback:
https://github.com/cea-hpc/clustershell/issues
AUTHOR
Stephane Thiell, CEA DAM <stephane.thiell@cea.fr>
COPYRIGHT
CeCILL-C V1
1.6 2012-03-28 CLUBAK(1)