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

How do I use the same shortcut to switch panes and windows in Tmux?
how to read words from a file using shell script
shell script to pass table name as a parameter in sqlplus?
How to open a tmux session dynamically?
self extracting tar archive (shell scripting)
How to move files listed in a text file to related directories?
Unix Shell command to copy all files inside current directory to subdirectory
How does docker run differ from running a command from a shell within the container
How to save the output of ack to a file?
If statement in awk works not as predicted
Sed command to replace comma-separated values with pipe-separated values
shell script to connect to docker daemon
How to change date format of data for each line in Unix?
Run command if exists
How to suspend a backgrounded shell with a script?
What does ā€œ-zā€ does exactly in a shell script?

Categories

HOME
c++11
nvd3.js
google-spreadsheet
static
solaris
error-handling
owl-carousel
spring-data-mongodb
permissions
pearson-correlation
32bit-64bit
owin
octave
dkim
heat
libusb
http-post
null-pointer
chargify
fileserver
jersey-1.0
smartclient
spring-async
dpdk
exit
monit
data.stackexchange.com
itunes
user-defined-functions
gp
jaws
uitapgesturerecognizer
finagle
zend-debugger
git-squash
github3.py
installshield-le
sharding
nested-lists
reverse
batching
sim-toolkit
timing
laravel-elixir
facebook-social-plugins
vaadin-elements
httrack
openal
x-ray
remedy
singleinstance
reindex
amq
py2neo
vibrate
javafx-css
node-request
grails-plugin
redbeard-ios
centrifuge
envi
segment-io
async.js
mta
data-protection
project-organization
dbamp
turbo-prolog
fink
invoke-sqlcmd
aspen
ascii-art
relativelayout
custom-errors
grgit
dronekit-android
node-serialport
actionfilterattribute
viewer
browserify-shim
metatrader5
human-computer-interface
personalization
scrypt
ice-cube
cocoalibspotify-2.0
composite-component
pagedown
booksleeve
device-width
sentestingkit
jquery-blockui
web-farm
apache-whirr
agility.js
entity-attribute-value
google-ajax-api
object-database
jqueryform
dot-emacs
addchild
request-headers
wordprocessingml
cuda.net
soappy
netbeans6.1

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