Ubuntu :: Cp Not Dealing With Variable Properly?
Mar 19, 2011
I am having trouble with a script that is supposed to : a)take all the jpg pictures in a given directory/parameter and create thumbnails of it in a directory on the desktop.
e.g
from /here/are/the/files.jpg to ~/Desktop/parser-the/files.png. this is my script: all the individual parts work but it falls apart when i put them together.
Code:
for picturesource in $(ls ${1}/*.[jJ][pP][gG])
do
echo this is the picturesource $picturesource;
destination=~/Desktop/parser-"${picturesource}";
echo this is the destination $destination;
[Code]...
View 2 Replies
ADVERTISEMENT
Sep 20, 2010
I have a laptop. At home and at the office I hook it up to an extra monitor for extra screen space. When I do this I add some panels on the second monitor.
When I occasionaly use my laptop op the train, all my extra panels show up on my first screen, which get really cluttered.
If I delete the panels I have to recreate them when I connect my extra screen again.
Is there any way of configuring gnome so that you can easily recreate 'deleted' panels, or configure the extra panels to not show up unless the second screen is attatched ('lock panel to screen')?
View 3 Replies
View Related
Mar 7, 2010
What can you do when your linux system "can't find" dynamically linked libraries that are indeed installed in their correct locations? Case in point, I'm trying to run a program called 'ucanvcam':
oliver@human ~/installed/ucanvcam-0.1.6/bin $ ./ucanvcam
./ucanvcam: error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory
oliver@human ~/installed/ucanvcam-0.1.6/bin $ locate libgd.so.2
/usr/lib64/libgd.so.2.0.0
/usr/lib64/libgd.so.2
oliver@human ~/installed/ucanvcam-0.1.6/bin $ ldd ./ucanvcam
linux-gate.so.1 => (0xf7706000)
[...]
libgd.so.2 => not found
[...]
librt.so.1 => /lib32/librt.so.1 (0xf6b1e000)
How can I tell it to look for libgd.so.2 in /usr/lib64? And more importantly, why isn't it looking there, and where is it looking?
View 1 Replies
View Related
Jul 2, 2011
My notebook's LCD runs at 1920x1080 while my external LCD runs at 1920x1200. For the most part I use the external LCD, but there are times when I need to disconnect and use just the notebook's LCD. Because of the different resolutions I need to exit my X session and go back in otherwise the higher resolution of the external LCD gets cut off when I switch to the notebook's LCD. Other than forcing a non-native 1920x1080 on the external LCD, is there any other way to get both screens to show the full desktop without having to restart X? The GPU I have is an nVidia with the nVidia drivers.
View 10 Replies
View Related
Jul 18, 2010
I am trying to extend my LVM and didn't feel like dealing with the terminal commands, so I downloaded system-config-lvm. But when I run it, I get the following readout:
Code:
sudo system-config-lvm
Traceback (most recent call last):
File "/usr/share/system-config-lvm/system-config-lvm.py", line 50, in <module>
from Volume_Tab_View import Volume_Tab_View
File "/usr/share/system-config-lvm/Volume_Tab_View.py", line 11, in <module>
from Properties_Renderer import Properties_Renderer
[Code]...
View 2 Replies
View Related
Apr 18, 2011
I am using Ubuntu 10.04 and trying to get a Novatel USB760 to work. Initially,it is detected as a CD rather than a modem. So, I wrote a udev rule to eject it and that worked, but sometimes the CD comes back and remounts itself and then kicks the modem off and the connection dies. I tried various ways to fix this, but no luck. Finally, I just deleted all the cd files in the /etc/udev/rules.d and the /lib/udev/rules.d (if you don't delete these, udev recreates the files in /etc/udev/rules.d). That does work and now the cd reports hardware errors and does not mount and the modem works as it should.
Now, this works on the device that does not and never will have a CD or DVD attached to it, but on my laptop I don't want to do that as I would not have access to my DVD drive. Does anyone know of a way to make the udev rules ignore specific hardware and not try to create mounts or symbolic links for those devices. Ideally, I would like to blacklist the novatel CD part and not the modem, but I am unsure how or if this is possible.
View 4 Replies
View Related
Jul 10, 2011
On my Mac, I use Text wrangler to store all of my html and css code I use to create my web site. So far so good, or should I say so great because I love using Textwrangler. My problem is that when I am aay from my computer or on another computer with another OS, I can't use Textwrangler. I am looking for a way (and I hope this is possible), to store and edit my code online no matter where I am or what computer I am using.
For the best in Jazz, In Transition every Sunday from noon-2pm EST www.chuo.fm
View 1 Replies
View Related
Nov 5, 2010
I currently work within an RTOS environment without an MMU and thus have access to the entire memory map of whatever application I'm working on. As is common in the embedded world, different parts of the memory map relate to different peripherals or different types of memory. For our next generation hardware, my company is looking at moving to an MMU-enabled processor and using Linux in some shape or form. Most of us in the dept are familiar with Linux, but we are not Linux gurus by any means. So how to explicitly indicate to Linux that we need certain portions of an application to be stored in NVRam and other portions of the application to NOT be based in NVRam has us confused. None of us have a clear understanding of how user memory is delved out by Linux and how we can influence Linux to use specific portions of the memory map at specific times.
For example in this new application, we expect to have 2 memory chips, both that are DDR3 interfaces. One is a standard DDR3 chip. The other is a non-volatile MRAM with a DDR3 interface so it can be accessed by a DDR3 controller and coexist with conventional DDR3 memory. But because the portion of the memory map that the MRAM will represent will be the only portion of non-volatile memory, we are unclear how we explicitly access MRAM addresses in an MMU-controlled environment. My hail-mary guess was that we would want to somehow tell Linux that we want the MRAM's memory space to be mounted as a RAM Drive and then we access that memory as though it is a file on a HD, except it is much higher speed since it will be at DDR3/MRAM speeds. Is there a better, more straight forward way to do this? Coming from an RTOS world, Linux is going to pose some serious challenges for us, but I think it will be the right move once we are all up to speed and are thinking Linux-centric.
View 1 Replies
View Related
Jan 20, 2011
I am trying to convert a file using ffmpeg. I have this following code in a terminal.
ffmpeg -i introvideofinal -vcodec libx264 -acodec libfaac introvideofinalfinal.mp4
It returns an error dealing just with the h264 codec saying that I need to use a vpre parameter? I can't find any documentation on using the vpre parameter.
View 1 Replies
View Related
Jul 18, 2010
I have two NASes. I work off of one, and the other is used as a backup. As I have it set up now, it's slow. Running a backup takes a week. Even for 7 TB, with 1,979,407 files, this seems a bit outlandish,particularly as both systems are RAID-5 and the network is all gigabit. I've been digging about in the rsync man pages, and I really don't understand what differentiates the various topologies.Right now, all the processing is being done on the backup NAS, which has the main volume from the main NAS mounted locally over SMB. I suspect that the SMB overhead is killing me, particularly when dealing with lots of files.
I think what I need is to set up rsync on the main nas as a daemon, and then run a local rsync client to connect to it, which would hopefully allow me to completely avoid the whole SMB-in-the-middle affair, but aside from mentioning that it's there, I can find very little information on why one would want to use the daemon mode for rsync.
Here's my current rsync command line: rsync -r -progress --delete /cifs/Thecus/ /mnt/Storage/input? Is there a better way/tool to do this? Edit:Ok, to address the additional questions: The "Main" NAS is a Thecus N7700. I have additional modules installed that give me SSH, and it has rsync, but it's not in the $PATH, and I havn't figured out how to edit the local $PATH in a way that persists between reboots. The "Backup" NAS is a DIY affair, built around a 1.6Ghz Via Mobo with a Adaptec Hardware RAID card. It's running CentOS 5 with a full desktop environment. It's the hardware I'm running rsync from. (Gigabit is through a additional PCI card).
Further Edit: Ok, got rsync over SSH working (thanks, lajuette!).I had to do a bit of tweaking on my command line, I'm running rsync with the args:rsync -rum --inplace --progress --delete --rsync-path=/opt/bin/rsync sys@10.1.1.10:/raid/data/Storage /mnt/Storage (Note: I'm specifically not using -a, because I want to change the ownership to the local account, to not freak-out SELinux)
View 5 Replies
View Related
Aug 21, 2009
I'm trying to read content of file to variable and use this variable in for loop. The problem is, when I have c++ comment style in file - /*. Spaces in line are also interpreted as separated lines.
For example:
Code:
Changing $files to "$files" eliminate these problems but causes that whole content of variable is treated as one string (one execution of loop).
View 6 Replies
View Related
Feb 17, 2011
how to assign a local variable value to a global variable....
View 2 Replies
View Related
Apr 7, 2010
my script has a variable which comes in the form +00.00 +0.00 -00.00 or -0.00 (the numbers can be any in that form) for any that have a + symbol I need to remove the +, but if it has a - symbol it needs to stay.
i need to make a new variable with the string from the old variable btut without any plus sign. I have tried a lot of different ways with no success, each thing I tried either left the + or removed the entire string. I think this should work but doesn't
foo=+12.40
bar=${foo#+}
View 4 Replies
View Related
Apr 16, 2011
I am supposed to create an environment variable with the PRINTER variable, which should resolve to the word sales. Would the command be like this?: env PRINTER - NAME=SALES (is this the command to create that variable with resolving the word sales to it?)
View 3 Replies
View Related
Jun 10, 2009
I have a text file i that has a mailTo: NAME in it. In a bash script i need to extract NAME and put it in a $variable to use. How do i do this?
View 2 Replies
View Related
Apr 25, 2011
how I can search within a variable and assign the results to a new variable. I'll use the following as an example -
cars="Audi BMW Cadillac Chevy Dodge Ferrari Ford Mercedes"
list=`echo ${cars} | egrep -o '<A?+|<C+'`
with the echo command I get the following output assigned to list -
A
C
C
What I'd like to get for output is -
Audi
Cadillac
Chevy
how I could do this regardless of upper/lower case letters?
View 5 Replies
View Related
Apr 28, 2010
included shell script inside c program, and i wanted to assign the value of c variable to shell variable..Can any one please suggest me how to do it?
View 8 Replies
View Related
Jul 25, 2010
can i use the value of one variable to generate a name for another variable? for example i want to use the counter from a "do while" loop to name and define a variable each time the loop executes. for example
objectnames1=`ls -a`
objectnames2=`ls -a`
etc.
i don't have a script yet but each time through the loop i intend to cd to a particular directory and then define a variable containing a list of each object in that directory as values. for the rest of the script to work, each variable generated has to be unique, and i can't think of a good way to accomplish this.
if using a value from one variable to name another isn't possible, can anyone think of a more elegant solution? i know limited syntax but i'm willing to read up...
View 6 Replies
View Related
Dec 27, 2010
I am trying to alter the character position of residue numbers above 999 in a pdb file.The following script is an attempt to:1) Get all unique pdb residue numbers (in column 5) using awk and assign it to a variable i.2) Loop through all the values in $i and if it is greater than 999, shift that number one character to the right using sed.However, the script only manages to alter the final residue numberCould anyone please advise how I can loop through all values in $i and shift it one character to the right?
#!/bin/bash
# Script to alter position of residue number in pdb file for resid above 999
i=$(awk '{print $5}' wt-test.pdb | uniq)
[code]...
View 6 Replies
View Related
Mar 17, 2011
This loop is part of a bash script which takes multiple arguments.
Code:
for ((i=1;i<=$number;++i)) ; do
offset=$(($i+5))
[code]...
View 3 Replies
View Related
Mar 29, 2011
How can I set up multipath to two devices properly? I'm sure that I need to do something more then just: /etc/init.d/multipathd start
View 1 Replies
View Related
Dec 8, 2009
On one of my servers I see this when I log in. What does this mean and how can I get it to go away? Everything seems to work fine, but none of my other machines give this error.
View 5 Replies
View Related
Mar 28, 2010
I'm making a script I want to be able to just call (ie, rclick instead of ./rclick) where do I put it?
~/bin?
/bin?
/usr/bin?
Also, how do I pass a variable to the script (rclick 10 will rightclick 10 times) (Found, so simple... $1)Lastly, can I force it to run on CPU2? CPU1 is completley locked up if I run this on it... Or can I make it use less cpu cycles?
View 2 Replies
View Related
Jun 28, 2010
Well on a Rsps forum it says that the reason i keep crashing in the client is cause my Envieronment Variable isnt set for Java. i was wondering how to do this.please make it deatailed since i am new to ubuntu and i dont know most of the things like usr/java
View 9 Replies
View Related
Feb 4, 2010
I'm trying to set the environment variable. java_home and path.
I used the following instruction:
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.14
and to check :
echo "java_home=$JAVA_HOME"
and every thing is ok.
But since i close the terminal every thing is deleted.
View 13 Replies
View Related
Mar 2, 2010
I have a script that backs up my computer that must be run like this:
Code:
sudo /home/bjorn/script.sh
However, I need to be able to change the ip it backs up to. I used to do this by rewriting the script when the ip changed, but I now have like 10 different scripts. So, it would be nice to be able to set a variable and then run my script. I used $bkup_ip in the place of all the old ip s in the script. However, it seems like if I set the variable with export, and then run the script with sudo the variable is empty. How can I set the variable so that it is available for the script?
View 2 Replies
View Related
Jun 19, 2010
I'm trying to configure subclipse with JAVAHL for ganymede. I have everything installed and the right version of the JAVAHL.
I have seen that a lot of people uses java.library.path in the eclipse.ini file to set it up or just write a script for launching eclipse.
I have read about the .gnomerc file but i couldn't find it or create one and make it work. I'm using a 9.04 ubuntu.. is there anyway to configure an environment variable for gnome? What i want is just click on the shotcut and have it working, not having to run a script or all that stuff.
View 1 Replies
View Related
Oct 10, 2010
I just upgraded to 10.10, I use Tilda (terminal client) on my desktop but now when I type "clear" it says "TERM environment variable not set." instead of clearing the screen. Also commands like "tree" does not show folders and iles in color like they did before upgrading.
View 4 Replies
View Related
Oct 20, 2010
I have just installed Ubuntu onto my machine and my question is if it automatically comes with the PATH environment variable?If so, how do I add something such as python.exe to the PATH environment variable?
View 2 Replies
View Related
Nov 15, 2010
what is a variable file?
View 2 Replies
View Related