Ubuntu Multimedia :: Bash Script To Switch Filename Around
Jan 30, 2011
I was wondering if anyone knows how to do this in Bash:
I have quite a few music files which have names like this:
All my music is named "ARTIST - SONGNAME.EXTENTION"
I have been looking for a program or bash script that would fix this automatically, but I can't find anything that will do this. a script laying around?
Tried pyRenamer, and it does a lot of things, except this...
View 2 Replies
ADVERTISEMENT
Jan 9, 2010
I would like to get the filename (without extension) and the extension separately. The best solution I found so far is:
Let FILE="thefilenameofsomefilesfor_instance.txt"
Code:
NAME=`echo "$FILE" | cut -d'.' -f1`
EXTENSION=`echo "$FILE" | cut -d'.' -f2`
I think it would be better to count the len and remove 3 chars to right to get the extension, but it can be macintosh filenames with have 4 chars for extensions.
View 5 Replies
View Related
Nov 18, 2010
What I have done wrong with my escaping here:
Code:
The original filename is:
Code:
View 4 Replies
View Related
Jan 15, 2010
I have over 50 files names with spaces in them.
I'm trying to use a for loop as such:
However, when I print the $filename in the script, the script prints out parts of the filename because of the spaces in the file name.
For example, say the file name was Star Quest.php
When the script executes one $filename would be Star and another Quest.php.
How could I account for this? Something like $'filename'
View 13 Replies
View Related
Jun 25, 2015
I am trying to create scripts to move files over from one directory to an ftp server and there is this one file with spaces that bash is see each word as being a file, here is the variable i am trying to use:
Code: Select allLOCL = '/mnt/cifs/"File name with spaces"/'
cd $LOCL
ls -l
View 3 Replies
View Related
Oct 21, 2010
I have a directory with files like this:
Code:
And what I'd like is to have the files renamed like this:
Code:
How could I code it so that it removes the numerical part of the filename (at the beginning), even with different patterns (like the 01 - artist vs the 01-artist)?
View 8 Replies
View Related
Oct 3, 2009
i have lots of files with dots insde file name for example:
document.1.is.bigger.doc
resume.version12.doc
10.photo.www.cnn.com.jpg
i want to rename all files in that directory to be the same (with same extention) but convert dots to underscore "_"
how can i do that on bash script / php.
View 6 Replies
View Related
Jan 23, 2011
$ uname -a
Linux a 2.6.35.10-74.fc14.i686.PAE #1 SMP Thu Dec 23 16:10:47 UTC 2010 i686 i686 i386 GNU/Linux
$ lsb_release -a
LSB Version: :core-4.0-ia32:core-4.0-noarch
[Code].....
How can I set a pattern that will output a filename equal to the original filename? E.g.
something.mp3 → something.ogg
And why isn't this implemented in SoundConverter?
PS: {Filename} doesn't work.
View 1 Replies
View Related
Apr 23, 2010
What is the difference between filename and ./filename? Under what circumstances is one preferred to the other?
View 5 Replies
View Related
Apr 6, 2010
I need to split a filename into its filename and extension, so I can append a datestamp to the filename. I'm using bash.
View 8 Replies
View Related
Nov 20, 2009
I've installed ethernet adapter, it is made in china from a manufacturer called FOX. The driver for that adapter is supported for sco linux kernel version 2.4.x and 2.5.x .However, I'm using Centos5 but the OS didn't recognize the adapter alone, so I'm trying to follo instructions on the driver on the attached CD.
The CD contains file named "SC92031.c", the instructions tell me to do the following "Compile the driver source files and it will generate sc92031.o"
View 8 Replies
View Related
Mar 11, 2011
From the man page for bash...
Quote:
If the -c option is present, then commands are read from string. If there are arguments after the string, they are assigned to the positional parameters, starting with $0.
Code:
View 6 Replies
View Related
Nov 22, 2010
what is the difference between <filename>.rpm and <filename>.src.rpm?
View 2 Replies
View Related
Jul 28, 2011
I need to switch from one user to another in a script in a solaris machine. No one of those users is root. I see I can use su commandt I think I can't pass the password as a parameter . I'm using bash. Is there anyway that I can switch user in a bash script
View 7 Replies
View Related
Jan 29, 2010
This is just an idea, and I want to know if it can be done. Could I set up Nautilus so that videos and songs have their durations shown in the filename? For example, let's say I have a video of me shooting targets. There would be an icon, and the filename underneath would say: "Range trip 2009.flv - 8:23"
Is there currently a way to do this?
View 1 Replies
View Related
Dec 15, 2010
I have a bunch of OGG files with TAGs I changed. Now I want to have the same changes done to the filename.I know I can do this easily with ie. EasyTAG but that makes all my songs get reindexed in Rhythmbox. This wouldn't be a problem hadn't I rated much of them already.s there a way to change the filename from within Rhythmbox, or with an external method, where the ratings are left intact. I need it to be done automatically, manually changing Rhythmbox' database file takes too much time with +2500 songs.
View 1 Replies
View Related
Nov 18, 2009
How can we convert a dynamic library (filename.so) to a static library (filename.a) using gnu gcc . Can we get a static library form a dynamic library . I saw a few post in which the conversion form a static library to a dynamic library is mentioned but, unfortunately, not the other way.
View 4 Replies
View Related
Apr 27, 2010
I have dual boot Win Vista and karmic. I use Vista for recording music and Karmic for all my other work. But Vista is unbearable (especially after discovering ubuntu). I want to move my music to linux environment as well. I have Phonic Firefly 302 USB audio interface, m-audio key rig 49 MIDI controller.
Should I try to set these up in ubuntu, or should I install a different distro on (eg., ubuntu studio or whatever). How do I get these recognized. What software should I go for (I use Tracktion and Reason in Vista)?
View 9 Replies
View Related
Feb 7, 2011
I have an an .avi I created in Blender and a .wav file that I want to 'stitch' into it, I have tried all the most common suggestions to no avail.
Obviously Blender can edit the audio as can Kdenlive which is a great little program but I can find nothing (except excessively involving) programs that will do this?
View 1 Replies
View Related
Jan 25, 2011
Below is my ~/.asoundrc, which is working as desired. I can change the "pcm.!default" value, log out then back in, and it takes effect as desired.
How can I switch the profiles without logging out? code...
View 3 Replies
View Related
Jul 24, 2011
I do not find any settings to switch the stereo output in Ubuntu, just now my speakers is placed so right speaker stands to the left and I can not move them just now. How do I do, I use Ubuntu 11.04.
View 1 Replies
View Related
Feb 14, 2010
I'm using an IOGEAR KVM Switch to switch between my newly built PC and Xbox 360. I've been using it for a while on my 360 with no problems, but to switch inputs you have to use a hotkey on a keyboard that is connected to the KVM switch (there is no button on the KVM switch to toggle between inputs). My KVM switch is compatible with Linux, but each time I plug in my Logitech Wired Wave keyboard into my KVM switch and use the hotkey it fails to switch the input. The hotkey is the Scroll Lock key on the keyboard, and the Logitech Wired Wave keyboard doesn't have a key dedicated to that function.
So I use the key combo for Scroll Lock, which is Fn + Pause/Break. I haven't mapped out all the keys on this keyboard yet, but I figured it should already be mapped out, since all the other basic keyboard keys are working. I managed to switch the toggle key from tapping the Scroll Lock key (combo) twice to tapping the Control key twice, after finally figuring out the manual's long and convoluted key combinations to change the input toggle key setting. If anyone else encounters this problem I would direct you to the Page 11 of the product manual, which is available at the product page linked to above.
View 1 Replies
View Related
Feb 28, 2010
I wanted to take an audio feed from a stereo amplifier into my HP Pavilion DV6 laptop, in order to digitally record some old vinyl.
In the Sound Preferences tab, I seemed to be able to record easily from the internal mic, but there seemed to be no easy way to switch the preferences to enable recording from the Line In socket on the laptop.
We tried muting the mic, this only caused the system to record nothing. We also tried all the various available options in "the Hardware Profiles" tab, "Settings for the available device", but no the laptop seemed to be getting no "line in" input with whatever profile we tried.
On Mac, it was as simple as switching the input sound preferences from "internal mic" to "line in".
View 4 Replies
View Related
Jul 4, 2010
Currently Monitor 0 is the TV (S-video). I want it to be my Monitor. My attempts to change this are failing Seams I'm just tripping over some little thing:
Unbuntu 10.04
Graphics - NVidia 7600
Displays - 2
- Samsung LCD (DVI)
- TV (S-Video)
I do not see how to switch the primary within NVidia's xserver app. Background Info: In order to get the TV out working, I disconnected the Monitor and booted the system - The TV-out then worked for the first time. Reconnected the monitor and rebooted again - both worked..but TV is Monitor0. All other options failed me when I set this up the first time
Current xorg.conf
Code:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildd@palmer) Fri Apr 9 10:35:18 UTC 2010
Section "ServerLayout"
[Code]...
View 2 Replies
View Related
Jul 31, 2010
I've HP DV 2000 laptop.
I'm trying to find out how to make my ubuntu to auto switch monitors when I connect my lcd into the vga plug and also switch the desktop bars into the new monitor and also use the laptop screen as a side screen.
In setting I can turn off my laptop screen and i'll see only on the lcd screen, but I need to configure it first, I want it to be automatically and when i plugged out the lcd it's back to normal.
View 2 Replies
View Related
Oct 17, 2010
I'm still on UBUNTUO 9.04 atm - I'm getting myself a Logitech USB headset. I plugged it in, and immediately I see this in dmesg
[ 7015.732141] input: Logitech Logitech USB Headset as /devices/pci0000:00/0000:00:1a.1/usb4/4-2/4-2:1.3/input/input11[ 7015.732234] generic-usb 0003:046D:0A0B.0006: input,hidraw3: USB HID v1.00 Device [Logitech Logitech USB Headset] on usb-0000:00:1a.1-2/input3 [ 7280.088017] usb 1-3: reset high speed USB device using ehci_hcd and address 3
Which is fantastic. Tested this on all kind of audio and I can hear them fine. So headset is working wonders. Except, everytime I want to switch the output from between the speaker and the headset, I have to go System > Preference > Sound > output tab > click on the switch. Which is fine, but the switching procedure via GUI is very arduous. Is there a way to to do this via the command line, if so I can bind it to a hotkey and therefore with one hotkey I will be able to switch between headset vs my speaker?
View 4 Replies
View Related
Oct 20, 2010
In 10.04 when i plugged my HiFi into a USB port audio would automatically switch to play out of it.Now in 10.10 i need to plug my hifi in then go to 'sound preferences'>'output' and select USB codec as my output AND unmute the device.Does anyone know of a way to revert to 10.04 behaviour?
View 3 Replies
View Related
Dec 4, 2010
im using ubuntu 10.10 now, kernel 2.6.35-23, in the past time im believe there is too much issues appears regarding to vaio z dual vga with ubuntu that ubuntu running both vga which cost battery power, but with ma kernel now it seems running a single and a default vga only, ma laptop [URL]
[Code]..
View 1 Replies
View Related
May 23, 2011
i have three jacks on the card, the usual with a normal home PC, - one for the speakers, second for the microphone, and third for line in. Now my speakers (Line out) jack is damaged a little. So when i plug in my speaker jack there, i get audio only in the right speaker (not a problem of the speakers, because i tested it, and not Ubuntu either, because this problem existed when i used to run Windows XP as well).
Now in Windows XP, what i used to do is, there was this tool (i think it came with the sound driver - Realtek) whenever i plugged in a jack into either of the sockets, a gui would ask me what i just plugged in, and it would allocate audio in and out according to what i specify then. So i used to plug in my speakers into the line in, because thats something i do not use, and used the tool to identify that jack as the line out.Is there some way i can do this on Ubuntu? i want to get line-out through the line-in socket. i'm a beginner with Ubuntu, and know only to use the GUI.
View 9 Replies
View Related
Sep 10, 2010
With pulseaudio handling sound on Lucid (10.04), when I plug in my USB headset it's recognized, but there was no easy way to have it be used without going to System > Preferences > Sound > Input & Output and checking the radio buttons. Then if it's unplugged, and plugged in again later, the setting has been lost, so it was back through the menus. Not good when the headset's not plugged in and I'm fumbling to answer a Skype call. What would be ideal is if pulseaudio could prioritize and always default to the headset when it's plugged in. But I'm told by one of the pulseaudio gods (Col) that it can't yet.Here's a way to at least get the switch down to one button on the panel bar.0. Get all your devices plugged in1. Find your outputs (speakers, headphones):Quote:pacmd list-sinks | grep alsa_output2. Find your inputs (such as a microphone):Quote:pacmd list-sources | grep alsa_input3. Write a bash file to choose one or both, like this but with device names appropriate to your system which you've discovered above for the alsa_output.* and alsa_input.* strings.Quote:
#! /bin/bash
pacmd set-default-sink alsa_output.usb-Generic_FREETALK_Everyman_0000000001-00-Everyman.analog-stereo
pacmd set-default-source alsa_input.usb-Generic_FREETALK_Everyman_0000000001-00-Everyman.analog-stereo
[code]....
View 7 Replies
View Related