Fedora :: Make A Script In Which Drag A File (with Spaces In File Name )?

Aug 2, 2011

i am trying to make a script in which i can drag a file (with spaces in file name ) and it will scp the file to another computermy code is

Code:
echo "--------------------------------------------"
echo "drag file now"

[code]....

View 7 Replies


ADVERTISEMENT

General :: Shell - Rename A File From Something Without Spaces To Something Containing Spaces?

Jan 26, 2010

Is it possible, in Linux, to rename a file from something without spaces to something containing spaces? I know I can create directories and files with spaces by doing:

mkdir "new dir" and:

touch "new file.txt"

I want to rename files from:

imgp0882.jpg to something like:

20091231 1243 some topic.jpg

And how would it look in a shell script that uses parameters like:

for i in *.jpg do
rename "$i" "$somepath/$mydate $mytime $mytopic$extension"
?

I'm new to Linux (using PCLinuxOS 2009.2), coming from Windows, and I've written myself a little shell script to download files from my camera and then automatically rename them according to a date-and-topic pattern. As you can guess by now, I'm stuck on the bit about renaming. If you want to see my script, here's a copy. I'm not using jhead for this renaming because that only works with JPEG files but I want a single solution for any media format including videos.

View 2 Replies View Related

Software :: Retain Multiple Spaces And Tabs In A File By C-sh File Operation?

Feb 21, 2011

Iam reading a file using C-sh script after manipulating the variables I need to dump into a new file. This in working fine but I couldn't retain the multiple spaces and tabs in a same line. For readability I want to print it back as I read. Now script treating multiple tabs as onl tab or space.

View 3 Replies View Related

Ubuntu :: Make With Make File Yields Error - /usr/bin/javac: Cannot Execute Binary File

Nov 17, 2010

When I try to compile some Java code on Ubuntu 10.10 (kernel 2.6+) using make and a Makefile.

I get an error indicating that the make utility cannot execute the java compile command (javac).

The error reads: /bin/bash: line 6: .: /usr/local/jdk1.5.0_18/bin/javac: cannot execute binary file

I am executing make as root. I have enabled permissions on all directories in the path /usr/local/jdk1.5.0_18/bin/javac and on javac itself.

I get this error whether using a jdk installed via ubuntu apt-get, or whether I install the jdk myself. And I get it using either Java 1.5 or 1.6

My machine has an 80386 processor. I notice the make utility is built for i686-pc-linux-gnu

However, I can manually compile using javac.

I can compile calling javac from within a bash script.

I can compile using the java compiler gcj from the command line: gcj --main=HelloWorld HelloWorld.java -o HelloWorld.exe

But I cannot compile java code from the makefile. Any reasons why I might be getting this error?

View 4 Replies View Related

General :: Make And Sh Commands - Make A File Called File Roller For Ubuntu 9.10

Apr 6, 2010

I want to make a file called file roller for Ubuntu 9.10. The folder has a file called install.sh and some others that are make.

I figure first I need to make a file and then run install.sh to install. But I don't know how to do this.

View 2 Replies View Related

OpenSUSE :: Spaces Allowed In-between Words In A File?

Jan 12, 2011

I tried Suse five or six years ago and ran into an issue that was not comfortable to work with so I went back to windows. The problem was open spaces between words was not permitted with my music files. I have transferred all of my CDs and LPs to MP3 and have a tremendous number of them and the Suse of five years ago required I convert a title like Foggy Mountain Special.mp3 into something resembling Foggy_Mountain_Special.mp3

I don't care to convert literally a hundred thousand titles to fit the latter format. Does the current version of Suse allow the use of spaces between the words or is the 'no open space' convention still required?

View 9 Replies View Related

Programming :: Bash File Names With Spaces?

Jul 24, 2010

I have a laptop that I am in through SSH. The laptop does not have an Xwindow system so I am using the program fbi to open an image on my laptop screen from my SSH connection:

fbi -T 8 picture.jpg #this opens the image on the laptops tty8 terminal

I've found that making a for loop does not work with files that contain a space in the name. Something to due with a bug that they call a "feature" that stops the first variable at the first whitespace.

Using a "while" loop is not exactly what i require either seeing as I want to be able to view each image in the directory on screen and tag it accordingly, before it jumps off to the next image, and I'm not sure how to add a pause to a while loop.

How do I make a Bash script and loop Variables handle files like "files that contain spaces.jpg"

View 5 Replies View Related

Slackware :: Are TABS Replaceable By Spaces In An Xml File

Jun 12, 2011

Kernel 2.6.21.5, slack 12.0 I have a file beginning with <?xml version=1.0?>. May I replace tabs by spaces in it?

View 6 Replies View Related

Debian :: Drag & Drop File On Bash Script?

Jul 29, 2011

On Windows, I can drop file on batch script file, then dropped file is accepted as script parameter and script is automatically executed. Trying the same in Nautilus it seems like not possible.Is there some other way of using this approach in Debian?I hope it's clear what I'm after - I don't want to write Nautilus scripts as workaround and want to avoid: - opening terminal - cd to bash script - type script name andmeter file then executeinstead I would like already mentioned, drop filename expected as parameter to bash script, and then script to execute automatically.

View 3 Replies View Related

Ubuntu :: Drag And Drop File Conflict With Nautilus

Nov 3, 2010

I have noticed that lately when I drag a file into another folder to replace a file of the same name, nautilus crashes. I need to restart nautilus to fix this. I can copy and paste to replace the file without a problem though.

View 2 Replies View Related

Ubuntu :: Replace All Tab Stops In A Text File With 4 Spaces?

May 18, 2011

How can I make vi and nano such that when I press the tab key, it automatically replaces the tab with 4 spaces?

View 5 Replies View Related

Programming :: Reading And Writing White Spaces To A File?

Dec 2, 2010

I am trying to read a file character wise and trying to write the same character to another file. In this process, I unable to read and write white spaces successfully to the new file. The script reads the white spaces but while writing the white space is lost. The section of the code, is given below. Please advice how can i read and retain the white space while writing to a new file.

Code:

if [ -s f_test.txt ] && [ -f f_test.txt ]; then
echo "File Exists !!"
while read -n1 char; do

[code]....

View 2 Replies View Related

Programming :: Replace Spaces With Underscores In File Names?

Jan 11, 2011

I often get files with many spaces as part of their names. I would like to automatically replace these spaces with underscores, but otherwise not change the file name. Is there a way to do this task with just the bash shell?

View 4 Replies View Related

General :: Remove Spaces From Many File Names Under Cygwin?

Nov 22, 2010

I'm hoping that someone can help me, I need to remove spaces (not replace with underscores) from several thousand files on a system with cygwin.
Can I do this from the shell using rename or mv somehow?

View 4 Replies View Related

General :: Lyx: File Name Error The Directory Path To The Document Cannot Contain Spaces

Sep 9, 2009

trying to write my thesis in Lyx 1.6. It works fine on my windows laptop at home but Not on my work computer. The problem is, when i try to view it in pdflatex it comes with with: Lyx: file name error The directory path to the document cannot contain spaces

View 1 Replies View Related

General :: .bashrc File Adds A Couple Of Tens Of Spaces To The Prompt?

Sep 3, 2010

I got myself a .bashrc file off the net. I checked it beforehand, didn't detect anything bad about it. One thing that's odd about it, is that several spaces are added to the terminal command line.Screenshot:Those spaces are not put there by me. The file can be found here: [URL]..

View 3 Replies View Related

Programming :: Rename File Names : Replace Dots By Spaces, Keep The Extension?

Mar 28, 2011

I am trying to rename a lot of files but need to keep the extension :

the files are films names :

a.b.c.d.***.iso

the result should be replacing "." by spaces " "

this command :

for files in *.iso ; do mv "$files" `echo "$files" | tr '.' ' '`; done

put a space also before the extension iso ??

How can I rename files from

"a.b.c.d.iso" to "a b c d.iso"

View 5 Replies View Related

General :: 6.13 GMP-5.0.0 LFS Make Error - Cannot Open Shared Object File: No Such File Or Directory

Jun 10, 2010

I'm currently stuck at 6.13 GMP-5.0.0 of the LFS installation. After running make, I receive the following:

error while loading shared libraries: libbfd-2.20.so: cannot open shared object file: No such file or directory
make[2]: *** [libmpn.la] Error 127
make[2]: Leaving directory `/sources/gmp-5.0.0/mpn'

[code]....

View 5 Replies View Related

General :: Make Arithmetic Operation Of Data File With Script File?

Aug 31, 2010

I wonder how to arithmetic operation of our data file using any script program/command (like sed, cut,awk)for example my data.file is:

45 65 42
12 23 61
43 34 21

I want to multiply first column with 2 and add second column with 3 then it become

90 68 42
24 26 61
86 37 21

View 5 Replies View Related

General :: Configure File Successfully But Make File Displayed Some Errors?

Jun 29, 2010

i am having a problem concern zlib installation.i tried configure file successfully but make file displayed some errors.that usr/linux/limits.h not found.so i found that i have to install glibc-headers-devel...but there is no such a kind of package in ubuntu repository?/????/some people saying that libc6-devel is equal to them!

View 1 Replies View Related

Ubuntu :: Format External Drive - Copy The Entire Home File Be Drag And Drop

Jun 8, 2010

I have an 500GB Iomega external drive connected to my iMac and used for the Mac Time Machine back-ups. I want to put a small partition on there that I can use to back-up my Ubuntu files which are on my laptop. I thought that I would be able to just copy the entire Home file on Ubuntu to this drive be drag and drop but this does not work. I get a notice to inform me that I do not have permission to create file there. I can however move files in the other direction (from the external drive to Ubuntu on the laptop. I assume this is because the external drive was formatted for Mac and I hope the problem will be solved if I could format a part of the drive in ext4 to accommodate the linux files.

View 7 Replies View Related

Programming :: Make A Folder For Each File In A Directory Then Move The File Into It

Nov 29, 2010

Initially I thought - use a for loop with ls in it:

Code:

However this causes lots of problems (folders have extensions, I have duplicate folders, the names with spaces create a folder for each element of the name).

The contents of the folder is basically movies (some with subtitles). Some of the names have things like (original) or CD1 CD2 in them.

View 15 Replies View Related

Fedora :: How To Make Backup File In F12

May 10, 2010

I would like to make a backup file from my fedora 12, in case if I have any problem with it, I could restore all my programs and settings from OS, I used do this with northon ghost in windows, but now in linux I don't know for sure. Yesterday I made a backup, in the end it was 34gb of his size, I wanna backup only what is used, how I do this?

View 7 Replies View Related

Fedora :: Download The Iso File Through Wget Make It Bad?

Jun 21, 2010

is it recommended to download an iso file of fedora 13, will the file be destroyed?because i did it twice and it seems not working.

View 6 Replies View Related

Red Hat / Fedora :: Running Opengl Make File?

Jun 7, 2010

I have a x86_64 i5 processor running Fedora 13.When I run the make file,I get the following error.Can someone help me out please?

# make
making all in ./lib...
make[1]: Entering directory `/home/Anil/Downloads/glut-3.7/lib'

[code]....

View 4 Replies View Related

Red Hat / Fedora :: Make Constraints On Size Of Any File?

Jun 23, 2011

If I have a file in which data is written which leads to the increase of this file size
Is it possible to make a constraint such that this file size mustn't exceed certain size
let say 5 MB for instance

View 6 Replies View Related

Fedora :: Make Preupgrade To Use Local ISO File?

Feb 23, 2010

I am having fedora 10 running on 64 bit machine. I want to upgrade to fedora 12 using preupgrade.
Now as per my knowledge it downloads all rpms from Internet, i not having that much huge bandwidth me, so that option is not feasible for me.

I am having fedora 12 iso file: Fedora-12-x86_64-DVD.iso

How can i configure preupgrade to use iso file rather then downloading all rpms and download only what is necessary.

View 4 Replies View Related

Fedora :: Make The File Explorer Only Use Browse Mode?

Aug 23, 2009

In fedora, to use browse mode, you have to right click on a folder and choose browse. How can I make that the default option, like in Ubuntu if that rings a bell on what I am talking about. Every time I double click a folder I would like browse mode.

View 3 Replies View Related

Fedora Installation :: Make A Simple Avi File Play?

Sep 21, 2009

I try to play a simple movie in avi format. The codec is called AC-3. I tried several tutorials, now i stuck with a "local file conflict between packages" when i run the auto install with movie player. I try now VLC Player ... With VLC it works! Open from the Administrator panel - Add or Remove Software than search for VLC and tick the main stuff and install.

View 14 Replies View Related

Fedora :: Doubt In Syntax Of A Generic Make File?

Sep 15, 2010

I was learning to write a make file, I could understand most part of it of course with few exception I dint understand what does the below commands make(red font). I would like to understand what those syntax represent rather than mugging up without knowing what it means.

$(OBJECTS) :%.o :%.c
$(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@

clean:

rm -f *.o $(TARGET) core

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved