how to convert output of bash script to .csv ?
0
0
Entering edit mode
7 weeks ago
Mariam ▴ 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 • 292 views
ADD COMMENT
0
Entering edit mode

pipe the output into paste - - -

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Please post the expected output.

ADD REPLY

Login before adding your answer.

Traffic: 1361 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