shell


How do i print multiple variables in separate lines into a file using shell scripting


i need to select string from one csv file to another properties file using shell
project.csv - this is the file which contains data like below & this may contain N number of lines/data
PN549,projects.pn549
SaturnTV_SW,projects.saturntv_sw
Need to collect each string "pn549" , "saturntv_sw" into a properties file
properties
[projects]
pn549_pt=pn549
saturntv_sw_pt=saturntv_sw
Below is the code i wrote to fetch the string and to print
cat "project.csv" | while IFS='' read -r line; do
Display_Name="$(echo "$line" | cut -d ',' -f 1 | tr -d '"')"
project_name="$(echo "$TEMP_Name" | cut -d '.' -f 2)"
echo "$project_name"
echo "$project_name"_pt="$project_name" > /opt/properties
How do i print multiple lines like i gave in example(properties)
i have got my answer, simply redirected the output

Related Links

Shell: script.sh is writing empty files
extract information from a file in unix using shell script
invalid condition in the if statement [duplicate]
I have to run a command in shell script and that command is asking for username and password and I want to hardcode it in script
How to install shell commands to enable the atom command at the command line?
shell command to achieve SCP task in Cloudbees
Subtract corresponding lines
What to add to `Path` in “System Variables” to install shell commands to enable the Atom command?
Wild characters in parameters of Unix Script
How to use awk to chop pattern in a line
how to remove unwanted text in vi with regex or similar pattern match
The second command doesn't run as root
How to install remotely PHP-Composer?
Getting log entry “disk online” from system log
How to break from case only and continue other loop
Change directory before running local script

Categories

HOME
embedded
xml
localization
fpga
angular2-material
jmx
themes
fftw
oracle-apex-5
sitecore
solver
rds
parameters
jquery-ui
crystal-reports-2013
flume
gson
watson-conversation
activecollab
jsonpath
openbugs
do-while
event-sourcing
asp.net-mvc-viewmodel
google-maps-autocomplete
breadth-first-search
ksh
named-entity-recognition
ios10.2
parcelable
php-mysqlidb
event-store
short-url
displaytag
soot
rpgle
google-earth
nsurl
gitlab-api
wacom
sendbird
browser-extension
openalpr
xdocreport
setup.py
dcmtk
attributeerror
clang++
flask-login
netbeans6.8
page-replacement
wpas
objectscript
reachability
reporting-services-2012
envi
tinkerpop3
greatest-n-per-group
macaulay2
nikeplus-api
tooleap
vorpal.js
jtwig
qbxml
libvlc
linklabel
google-books
zen-cart
rubaxa-sortable
page.js
jdk1.7
snackbar
cryptographichashfunction
theos
iiop
ignite-ui
personalization
malformedurlexception
xmltodict
mysql-error-1044
composite-component
onload-event
preload
qi4j
mapping-by-code
virtualpathprovider
flex-mobile
tournament
appledoc
uideviceorientation
vs-android
object-database
aspmenu
isapi-extension
sifr
burndowncharts
spread
echo3
flvplayback
product-management

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App