Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to Dump data into CSV file which is Separate by <tab>? Post 303032610 by nezabudka on Thursday 21st of March 2019 03:45:09 AM
Old 03-21-2019
Code:
pr -mts$'\t' <(sed '/^$/,$d' file) <(sed '1,/^$/d' file)

a different order would be easier
Code:
fmt file | column -t

But I understand the elementary example has a more complex structure?

--- Post updated at 09:46 ---

Code:
paste  <(sed '/^$/,$d' file) <(sed '1,/^$/d' file)

--- Post updated at 10:45 ---

Code:
awk '
BEGIN           {i=0}
!/^$/           {BUF[i] = BUF[i] sp $0; i+=1}
/^$/            {i=0; sp = "\t"}
END             {for (i in BUF) print BUF[i]}
' file


Last edited by nezabudka; 03-21-2019 at 04:54 AM..
This User Gave Thanks to nezabudka For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to create a CSV File by reading fields from separate files

SHELL SCRIPT Hi, I have 3 separate files within a folder. Every File contains data in a single column like File1 contains data mayank sushant dheeraj File2 contains DSA_AT MG_AT FLAT_09 File3 contains data 123123 232323 (2 Replies)
Discussion started by: mayanksargoch
2 Replies

2. Shell Programming and Scripting

Shell script - Excel/CSV file - More than one tab

Hi All, Following is my requirement. I have searched the site and found some threads which has same queries, but non of them have any answer. I thought of posting it once more. We are generating different reports through shell script after we finish our data load. Currently there are 7 such... (5 Replies)
Discussion started by: ace_friends22
5 Replies

3. Shell Programming and Scripting

Conversion of xhtml data into csv format using dump utility

Hi Unix Gurus, I tried to convert the attached xhtml table content into csv file using unix shell script (lynx -dump filename) and got the below results: Title ID Owner Priority Estimate Project Change Date Changed By Complexity Create Date Created By Detail Estimate Total De tail... (6 Replies)
Discussion started by: bi.infa
6 Replies

4. UNIX for Dummies Questions & Answers

using sed delete a line from csv file based on specific data in two separate fields

Hello, :wall: I have a 12 column csv file. I wish to delete the entire line if column 7 = hello and column 12 = goodbye. I have tried everything that I can find in all of my ref books. I know this does not work /^*,*,*,*,*,*,"hello",*,*,*,*,"goodbye"/d Any ideas? Thanks Please... (2 Replies)
Discussion started by: Chris Eagleson
2 Replies

5. Shell Programming and Scripting

How to add a new sheet or a new tab in a csv file?

Hi All, I woulk like thanks to all of you for your instant support. I am again in a trouble so move to here for solution. I want to add a new sheet or a new tab in a csv file means a singly csv file having two or more sheets. Please help me any help towards this should highly be appreciated. ... (3 Replies)
Discussion started by: Ashish Singhal
3 Replies

6. Shell Programming and Scripting

Csv file separate using awk

Hi, I have file like below apple,orange,pineapple,pappya,guva,avocado want to store as apple orange pineapple pappya I tried below command to seprate first field command1: (3 Replies)
Discussion started by: stew
3 Replies

7. UNIX for Dummies Questions & Answers

Writing multiple outputs in to separate cells of CSV file

Hi I am writing a script which has multiple awk statements and each statement gives me a numeric count as an output. I want those output to be stored in different cells of a csv file. say 12 awk statements give 12 output and i want them in diffrenet cells of csv file. Thank you guys..!! (4 Replies)
Discussion started by: prabhat.diwaker
4 Replies

8. Shell Programming and Scripting

How to convert space&tab delimited file to CSV?

Hello, I have a text file with space and tab (mixed) delimited file and need to convert into CSV. # cat test.txt /dev/rmt/tsmmt32 HP Ultrium 6-SCSI J3LZ 50:03:08:c0:02:72:c0:b5 F00272C0B5 0/0/6/1/1.145.17.255.0.0.0 /dev/rmt/c102t0d0BEST /dev/rmt/tsmmt37 ... (6 Replies)
Discussion started by: prvnrk
6 Replies

9. Shell Programming and Scripting

Compare 2 files of csv file and match column data and create a new csv file of them

Hi, I am newbie in shell script. I need your help to solve my problem. Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file. File1: SourceFile,DateTimeOriginal /home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies

10. Shell Programming and Scripting

How to separate data coming in one column of CSV file?

I am running an ISQL command on Sybase DB and getting output of a query in an CSV file. The issue is that all the data comes in to the same column, i want them to be separated in different columns. SQL_COMMAND=command.sql file=file.txt formatFile=formatFile.txt report=report.csv echo... (1 Reply)
Discussion started by: Sharma331
1 Replies
PDB2PQR(1)							  PDB2PQR Manual							PDB2PQR(1)

NAME
pdb2pqr - Generate PQR files for use in electrostatics calculations SYNOPSIS
pdb2pqr [--nodebump] [--noopt] [--chain] [--assign-only] [--clean] [--ffout=name] [--with-ph=ph] [--apbs-input] [--ligand=path] [[--verbose] | [-v]] --ff=forcefield path output-path pdb2pqr {--help | -h} DESCRIPTION
pdb2pqr automates many of the common tasks of preparing structures for continuum electrostatics calculations, providing a utility for converting protein files in PDB format (path) to PQR format (output-path). These tasks include: o Adding a limited number of missing heavy atoms to biomolecular structures o Determining side-chain pKas o Placing missing hydrogens o Optimizing the protein for favorable hydrogen bonding o Assigning charge and radius parameters from a variety of force fields OPTIONS
pdb2pqr accepts the following options: --ff=forcefield The forcefield to use. Current values are amber, charm, parse and tyl06. --help, -h Print a help message and exit. --nodebump Do not perform debumping operation. --noopt Do not perform hydrogen optimization. --chain Keep the chain ID in the output PQR file. --assign-only Only assigns charges to add atoms, debump, or optimize. --clean Do no optimization, atom addition, or parameter assignment, just return the original PDB file in alligned format. --ffout=name Instead of using the standard caninical naming scheme for residue and atom names, use the names from the given forcefield. --with-ph=ph Use propka to calculate pKas and apply them to the molecule given the pH value. Actual PropKa results will be output to output-path.propka. --apbs-input Create an APBS input file based on the generated PQR file. Also create a Python pickle for using these parameters in other programs. --ligand=path Calculate the parameters for the ligand in MOL2 format at the given path. Pdb2pka must be compiled. --verbose, -v Print additional information to screen. EXTENSIONS
Extensions add functionality to PDB2PQR and are called by passing a parameter to pdb2pqr. They put their results into files located in output-path. The following extensions can be used by pdb2pqr: --phi Print the per-residue backbone phi angle to output-path.phi. --psi Print the per-residue backbone psi angle to output-path.phi. --hbond Print a list of hygrogen bonds to output-path.hbond. --chi Print the per-residue backbone chi angle to output-path.chi. --contact Print a list of contacts to output-path.con. --hbondwhatif Print a list of hydrogen bonds to output-path.hbo. --salt Print a list of salt bridges to output-path.salt. --rama Print the per-residue phi and psi angles to outpath-path.rama. CITING PDB2PQR Please acknowledge your use of pdb2pqr by citing: Dolinsky TJ, Nielsen JE, McCammon JA, Baker NA. PDB2PQR: an automated pipeline for the setup, execution, and analysis of Poisson-Boltzmann electrostatics calculations. Nucleic Acids Research, 32, W665-W667 (2004). SEE ALSO
psize(1) AUTHOR
Manuel Prinz <debian@pinguinkiste.de> Wrote this manpage for the Debian System. COPYRIGHT
Copyright (C) 2008 Manuel Prinz pdb2pqr 2008-06-04 PDB2PQR(1)
All times are GMT -4. The time now is 03:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy