Hi,
How to replace any character in a file with a newline character using sed ..
Ex:
To replace ',' with newline
Input:
abcd,efgh,ijkl,mnop
Output:
abcd
efgh
ijkl
mnop
Thnx in advance.
Regards,
Sasidhar (5 Replies)
Hello,
I'm trying to write a method which will return the extension of a file given the file's name, e.g. test.txt should return txt. I'm using C so am limited to char pointers and arrays. Here is the code as I have it:
char* getext(char *file)
{
char *extension;
int i, j;... (5 Replies)
I am trying to do some thing like this ..
In a file , if pattern found insert new pattern at the begining of the line containing the pattern.
example:
in a file I have this.
gtrow0unit1/gctunit_crrownorth_stage5_outnet_feedthru_pin
if i find feedthru_pin want to insert !! at the... (7 Replies)
hello everybody!
i have aproblem! i dont know how to concatenate const char* with char
const char *buffer;
char *b;
sprintf(b,"result.txt");
strcat(buffer,b);
thanx in advance (4 Replies)
Hi
I m having ifconfig -a o/p like
sbanlab1:ksh# ifconfig -a | egrep "flags|inet" | awk -F' ' '{print $1,$2}'
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>
inet 127.0.0.1
lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>
inet 127.0.0.1
bge0:... (1 Reply)
Compiling xpp (The X Printing Panel) on SL6 (RHEL6 essentially):
xpp.cxx: In constructor ‘printFiles::printFiles(int, char**, int&)’:
xpp.cxx:200: error: invalid conversion from ‘const char*’ to ‘char*’
The same error with all c++ constructors - gcc 4.4.4.
If anyone can throw any light on... (8 Replies)
Hi experts , im new to Unix,AWK ,and im just not able to get this right.
I need to match for some patterns if it matches I need to print the next few words to it.. I have only three such conditions to match… But I need to print only those words that comes after satisfying the first condition..... (2 Replies)
Pointers are seeming to get the best of me and I get that error in my program.
Here is the code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define REPORTHEADING1 " Employee Pay Hours Gross Tax Net\n"
#define REPORTHEADING2 " Name ... (1 Reply)
The intended result should be :
PDF converters
'empty line'
gpdftext and pdftotext?xml version="1.0"?>
xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters
gpdftext and pdftotext</note-content>... (9 Replies)
Hi I have a file where i want to remove a char before a specific pattern.
exp:
CREATE TABLE
(
A,
B,
C, ----comma needs to be removed
)AS SELECT
A,
B,
C, ----comma needs to be removed
FROM TABLE.
So i want to delete the comma(,) after the C both ways.Pattern can be... (11 Replies)
Discussion started by: raju2016
11 Replies
LEARN ABOUT CENTOS
hwloc-distances
HWLOC-DISTANCES(1) hwloc HWLOC-DISTANCES(1)NAME
hwloc-distances - Displays distance matrices
SYNOPSIS
hwloc-distances [options]
OPTIONS -l --logical
Display hwloc logical indexes (default) instead of physical/OS indexes.
-p --physical
Display OS/physical indexes instead of hwloc logical indexes.
-i <file>, --input <file>
Read topology from XML file <file> (instead of discovering the topology on the local machine). If <file> is "-", the standard input
is used. XML support must have been compiled in to hwloc for this option to be usable.
-i <directory>, --input <directory>
Read topology from the chroot specified by <directory> (instead of discovering the topology on the local machine). This option is
generally only available on Linux. The chroot was usually created by gathering another machine topology with hwloc-gather-topology.
-i <specification>, --input <specification>
Simulate a fake hierarchy (instead of discovering the topology on the local machine). If <specification> is "node:2 pu:3", the
topology will contain two NUMA nodes with 3 processing units in each of them. The <specification> string must end with a number of
PUs.
--if <format>, --input-format <format>
Enforce the input in the given format, among xml, fsroot and synthetic.
--restrict <cpuset>
Restrict the topology to the given cpuset.
-v --verbose
Verbose messages.
--version
Report version and exit.
DESCRIPTION
hwloc-distances displays also distance matrices attached to the topology. A breadth-first traversal of the topology is performed starting
from the root to find all distance matrices.
NOTE: lstopo may also display distance matrices in its verbose textual output. However lstopo only prints matrices that cover the entire
topology while hwloc-distances also displays matrices that ignore part of the topology.
EXAMPLES
On a quad-socket opteron machine:
$ hwloc-distances
Latency matrix between 4 NUMANodes (depth 2) by logical indexes:
index 0 1 2 3
0 1.000 1.600 2.200 2.200
1 1.600 1.000 2.200 2.200
2 2.200 2.200 1.000 1.600
3 2.200 2.200 1.600 1.000
RETURN VALUE
Upon successful execution, hwloc-distances returns 0.
hwloc-distances will return nonzero if any kind of error occurs, such as (but not limited to) failure to parse the command line.
SEE ALSO hwloc(7), lstopo(1)1.7 Apr 07, 2013 HWLOC-DISTANCES(1)