LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-01-2008, 04:10 AM   #1
baig
Member
 
Registered: Nov 2008
Location: وادی ھنزہ
Distribution: Solaris 5.10, Debian Server 5.2, CentOS 5.6
Posts: 226
Blog Entries: 3

Rep: Reputation: 38
How to strcat ?


Hello there,

How can I add two strings together in the below script?

new=strcat($song,"**.mp3");-->This is C syntax, not working here..

how can I concatenate **.mp3 with value $song in bash scripting?

Code:
#! /bin/bash

echo "Write starting of mp3 song:"
read song
new=strcat($song,"**.mp3");
find ~/ -name "$song" | sort | more
cheers!!!
 
Old 12-01-2008, 04:24 AM   #2
nc3b
Member
 
Registered: Aug 2005
Posts: 330

Rep: Reputation: 32
Hello. What do you think of

Code:
#!/bin/bash

echo "Write starting of mp3 song:"
read song

find ~/ -name "${song}.mp3" | sort | more
Cheers
 
Old 12-01-2008, 04:28 AM   #3
baig
Member
 
Registered: Nov 2008
Location: وادی ھنزہ
Distribution: Solaris 5.10, Debian Server 5.2, CentOS 5.6
Posts: 226

Original Poster
Blog Entries: 3

Rep: Reputation: 38
Thanks allot..

As I have recently started scripting.. So It will take time to know these little thing..
 
Old 12-01-2008, 04:42 AM   #5
baig
Member
 
Registered: Nov 2008
Location: وادی ھنزہ
Distribution: Solaris 5.10, Debian Server 5.2, CentOS 5.6
Posts: 226

Original Poster
Blog Entries: 3

Rep: Reputation: 38
Thanks allot once again..


Cheers!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
strcat segmentation fault mesh2005 Programming 4 10-16-2006 07:59 AM
strcat Core Dump monil Programming 4 03-08-2005 11:20 AM
Why are some elements missing after using strcat() monil Programming 4 03-08-2005 07:40 AM
strcat() error with gcc sureshkellemane Programming 17 02-21-2005 12:42 AM
RH 8.0 strcat problem shibdas Programming 1 07-02-2003 01:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration