add a additional column in csv file

Thanks for allwoing me to discuss in this forum

GIVEN BELOW A simple shell script which will ask for the user to input a PC name and it will produce the output in CSV with the PC name

#! /bin/bash
read -p "enter the PC name :" pc
#checking for netstat report
netstat -pant |sed '1,2d' |awk '{$1=$1; print}' OFS=,  > "$pc _netstat.csv"

#checking for process list
ps aux | awk '{$1=$1; print}' OFS=, | cut -d ',' -f1-4,10,11 | awk ' BEGIN{FS=","} {print $2 "," $1 "," $5 "," $6 ", " $3 "," $4} END{}' >  "$pc _process.csv"

The output is provided as a attachment

Now how can i make changes in script so that i should get a additional column in the beginning of csv file with PC name in each field....

suppose if Lenovo_pc is the PC Name which user entered then output should be as follows--
netstat_csv file

Lenovo_pc,tcp,0,0,127.0.0.1:3310,0.0.0.0:*,LISTEN,3203/clamd
Lenovo_pc,tcp,0,0,127.0.0.1:631,0.0.0.0:*,LISTEN,3148/cupsd
Lenovo_pc,tcp,0,0,192.168.2.101:56014,66.220.153.29:80,TIME_WAIT,-

process_csv file

Lenovo_pc,1,root,0:01,init,0,0
Lenovo_pc,2,root,0:00,[kthreadd],0,0
Lenovo_pc,3,root,0:00,[migration/0],0,0
Lenovo_pc,4,root,0:00,[ksoftirqd/0],0,0
Lenovo_pc,5,root,0:00,[migration/1],0,0
Lenovo_pc,6,root,0:00,[ksoftirqd/1],0,0
Lenovo_pc,7,root,0:00,[events/0],0,0

any suggestions in this regard is greatly appreciated
thanks in advance

Hi, try:

awk '{$1=pc OFS $1; print}' OFS=, pc=$pc