LinuxQuestions.org
Register a domain and help support LQ
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 04-04-2004, 08:47 AM   #1
Xa!
LQ Newbie
 
Registered: Mar 2004
Location: .ru/moscow
Distribution: Gentoo
Posts: 17

Rep: Reputation: 0
(mc, samba, mplayer) delete 2 first chars in an argument


Hi!


in .mc/bindings i write

------------------------------------------------------
include/video
open=(mplayer %d/%p >/dev/null 2>&1 &)
------------------------------------------------------
and it works fine untill i want to watch a film from unmounted samba because "%d/%f" returns something like "/#smb://computer-pc/video/file.avi", but mplayer needs "smb://computer-pc/video/film.avi".

So what must i write in .mc/bindings to return proper file-path, i.e. delete "/#" in a path returned by "%d/%p"
 
Old 04-28-2004, 03:45 AM   #2
iluvatar
Member
 
Registered: Jul 2003
Location: netherlands
Distribution: debian
Posts: 403

Rep: Reputation: 30
you may want to try this:

-----------------------------------------------------
include/video
open=(mplayer $(echo %d/%p | sed s/"#\/"//) >/dev/null 2>&1 &;)
-----------------------------------------------------

this will remove the first '#/' if it's there...

greetz,
.-=~ iluvatar ~=-.
 
  


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
Can't delete a directory with samba mortalic Linux - Networking 7 12-21-2010 01:03 AM
Samba :- Cant delete files listlow Linux - General 5 11-23-2006 07:52 AM
Samba does not delete files pinaker Linux - Software 2 10-08-2005 05:50 AM
i installed mplayer from source file and now i wanna delete it from my computer ... SlackwareMan Linux - Software 6 07-30-2004 08:40 AM
Samba shares with national chars niklasa Linux - Software 0 03-07-2003 07:08 AM


All times are GMT -5. The time now is 09:40 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