LinuxQuestions.org
Help answer threads with 0 replies.
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 06-17-2004, 03:16 PM   #1
Baix
Member
 
Registered: Jun 2004
Distribution: Gentoo, LFS, Slackware
Posts: 203

Rep: Reputation: 30
Question My first alias in .bashrc...'apostrophes 'getting' in the way?'


Hey guys first post

I've been trying to learn linux for a long time now and after a long break I'm finally having some successes

I'm trying to make an alias called 'share' for the command:
smbclient '\\CV943500-a\share$'

I added this to .bashrc and source'd it:
alias share='smbclient '\\CV943500-a\share$''

When I try to run it smbclient gives the error:
share: not enough '\' characters in service

Is smbclient not reading it right because of the double apostrophes? When I run the command normal it works fine. Thanks alot in advance :-D
(Note those are two single ( ' ) apostrophes not one double ( " )
 
Old 06-17-2004, 03:28 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Firstly, those should be slashes, not back-slashes.
Secondly, there's no need to wrap the service name
into quotes.
Try

alias share='smbclient //CV943500-a/share$'



Cheers,
Tink
 
Old 06-17-2004, 03:33 PM   #3
Baix
Member
 
Registered: Jun 2004
Distribution: Gentoo, LFS, Slackware
Posts: 203

Original Poster
Rep: Reputation: 30
Thanks! I wonder why it worked with backslashes when I just typed it. Anyway it works now, woot
 
Old 06-17-2004, 03:36 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Pleasure ;)
 
  


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
using 'watch' on an alias in .bashrc slackist Linux - General 11 01-29-2016 02:09 PM
adding perm. alias to .bashrc Lleb_KCir Linux - General 7 12-09-2004 03:35 PM
making alias, can't find .bashrc file djgerbavore Slackware 10 07-23-2004 09:23 AM
alias and .bashrc whaase Linux - General 3 11-02-2003 08:03 PM
alias and bashrc Haldir Linux - Newbie 3 06-14-2002 06:11 PM


All times are GMT -5. The time now is 06:46 AM.

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