Hello I'm looking to take one file that has multiple lines and columns and add (sum) the values horizontally of columns with repeated headers. In my file, I'm ignoring the first 9 columns and the first row because I want them to be printed in the outcome, untouched. (the columns are not in a repeating order and there are many more columns than the example). The idea is something like this:
Hello everybody,
I have a text file containing 10,000 rows and 5000 columns. The values are separated by a tab.
Ex.
file_ex.ped
1 mike 0 0 2 1 A A G G C T A G
1 jack 0 0 2 2 T A G T C A A C
1 Mary 0 0 1 2 A T G C A T G C
...
I would like a out put file
1 mike 0 0 2 1 AA GG CT AG
1... (7 Replies)
Hi Guys,
I want to combine 2 files and and put together in 1 file and make two columns out it. See below desired output. Any help will be much appreciated.
inputfile1.txt
12345
67890
24580
inputfile2.txt
AAAAA
BBBBB
CCCCC (11 Replies)
This may seem obvious but I am having problems doing this as columns get converted to rows when i try to write a script.
I have 2 files text1.txt and text2.txt each of which have 6 columns of numbers separated by a space.
I need to combine the 2 files so that the output file text3.txt maintains... (2 Replies)
Hi, Great minds, I have some files, in fact header files, of CTD profiler, I tried a lot C programming, could not get output as I was expected, because my programming skills are very poor, finally, joined unix forum with the hope that, I may get what I want, from you people,
Here I have attached... (17 Replies)
Hello everyone,
I searched the forum looking for answers to this but I could not pinpoint exactly what I need as I keep having trouble.
I have many files each having two columns and hundreds of rows.
first column is a string (can have many words) and the second column is a number.The files are... (5 Replies)
Hello,
I have some tab delimited text files with a three header rows. The headers look like, (sorry the tabs look so messy).
index group Name input input input input input input input input input input input... (9 Replies)
Need some help with this ... please
60644,NJ090237_0263_GRP,NJ090237_0263_VIEW,NJ090237_0263_PSGRP,NJ090237_0263_GOLD_CSGRP,,06E:0_08E:0_09E:0_11E:0,0CE5,TDEV,34,VP_TIER... (3 Replies)
Hello,
I have to fish out some specific columns from a file based on the header value. I have the list of columns I need in a different file. I thought I could read in the list of headers I need,
# file with header names of required columns in required order
headers_file=$2
# read contents... (11 Replies)
Hi All,
i am trying to print required multiple columns dynamically from a fie.
But i am able to print only one column at a time.
i am new to shell script, please help me on this issue.
i am using below script
awk -v COLT=$1 '
NR==1 {
for (i=1; i<=NF; i++) {
... (2 Replies)
Discussion started by: balu1234
2 Replies
LEARN ABOUT LINUX
lsns
LSNS(8) System Administration LSNS(8)NAME
lsns - list namespaces
SYNOPSIS
lsns [options] [namespace]
DESCRIPTION
lsns lists information about all the currently accessible namespaces or about the given namespace. The namespace identifier is an inode
number.
The default output is subject to change. So whenever possible, you should avoid using default outputs in your scripts. Always explicitly
define expected columns by using the --output option together with a columns list in environments where a stable output is required.
Note that lsns reads information directly from the /proc filesystem and for non-root users it may return incomplete information. The cur-
rent /proc filesystem may be unshared and affected by a PID namespace (see unshare --mount-proc for more details). lsns is not able to see
persistent namespaces without processes where the namespace instance is held by a bind mount to /proc/pid/ns/type.
OPTIONS -J, --json
Use JSON output format.
-l, --list
Use list output format.
-n, --noheadings
Do not print a header line.
-o, --output list
Specify which output columns to print. Use --help to get a list of all supported columns.
The default list of columns may be extended if list is specified in the format +list (e.g. lsns -o +PATH).
-p, --task pid
Display only the namespaces held by the process with this pid.
-r, --raw
Use the raw output format.
-t, --type type
Display the specified type of namespaces only. The supported types are mnt, net, ipc, user, pid, uts and cgroup. This option may
be given more than once.
-u, --notruncate
Do not truncate text in columns.
-V, --version
Display version information and exit.
-h, --help
Display help text and exit.
AUTHORS
Karel Zak <kzak@redhat.com>
SEE ALSO nsenter(1), unshare(1), clone(2), namespaces(7)AVAILABILITY
The lsns command is part of the util-linux package and is available from https://www.kernel.org/pub/linux/utils/util-linux/.
util-linux December 2015 LSNS(8)