LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, 05: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, 05: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, 05:28 AM   #3
baig
Member
 
Registered: Nov 2008
Location: وادی ھنزہ
Distribution: Solaris 5.10, Debian Server 5.2, CentOS 5.6
Posts: 226
Blog Entries: 3

Original Poster
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, 05:42 AM   #5
baig
Member
 
Registered: Nov 2008
Location: وادی ھنزہ
Distribution: Solaris 5.10, Debian Server 5.2, CentOS 5.6
Posts: 226
Blog Entries: 3

Original Poster
Rep: Reputation: 38
Thanks allot once again..


Cheers!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:59 AM
strcat Core Dump monil Programming 4 03-08-2005 12:20 PM
Why are some elements missing after using strcat() monil Programming 4 03-08-2005 08:40 AM
strcat() error with gcc sureshkellemane Programming 17 02-21-2005 01:42 AM
RH 8.0 strcat problem shibdas Programming 1 07-02-2003 02:00 PM


All times are GMT -5. The time now is 05: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration