how to convert output of bash script to .csv ?
1
0
Entering edit mode
3.1 years ago
m90 ▴ 30

I want to convert the output of the below mariamscript.sh shell script to csv, so that I can get the information in column format :

#!/bin/bash 
Name="mariam moahmed"
Email=mariamdarwish880@gmail.com
slack=mariamdarwish0
biostack="transcriptomics/machinelearning and datascince" 

for i in  {Name,Email,slack,biostack}

do 
echo "$i = ${!i}"
done
bash csv • 1.1k views
ADD COMMENT
0
Entering edit mode

Please post the expected output.

ADD REPLY
0
Entering edit mode
3.1 years ago

pipe the output into paste - - -

ADD COMMENT
0
Entering edit mode

shouldn't it be paste -d "," - - - - ?

ADD REPLY

Login before adding your answer.

Traffic: 1542 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6