General :: Match A File Name Without Extension In Csh?

Aug 8, 2011

#!/bin/csh -f
source /xxxx/
set $spicedir = `sim_${1%.*}`
printf "Output folder is %s
" $spicedir
toolcommand -i $1 -o $spicedir
(-o output directory, -i =input)

I got spicedir: Undefined variable in my xterm

How could I match a file name without extension in csh

View 1 Replies


ADVERTISEMENT

General :: Add A File Extension To A Bunch Of File Names?

Oct 20, 2010

I have a considerable number of files in a subdirectory (some fascinating old military clips from archive.org - search on Big Picture if interested). Anyhow, I am downloading them using Internet Download Manager running in an XP virtual machine in VMWare on my Ubuntu 10.04 PC (due to the queuing, restart and speed capabilities of IDM). But I digress - the files are being saved on the host (Samba share) without a file extension. So I have a collection of files with names like

Quote:

The Douglas MacArthur Story
THEY WERE THERE (1960)

I wish to add the extension ".mp4" In Windows this is simply done with the command

Quote:

rename *. *.mp4

This of course does not work in Linux. I have researched the Linux rename command and reviewed a lot of examples. However, I have not found a way to add an extension to a batch of files which are named with no extension to start with. The spaces in the file names also seem to present an issue. At the moment I am renaming them from the Windows VM while they are sitting on the Samba share using the ancient File Manager program from Windows NT which works great on XP. I have experimented with the file rename facility in Gnome Commander however, it does not seem to want to do something so simple.

View 10 Replies View Related

General :: Accessing .dd File Extension

Mar 2, 2010

I am trying to access a .dd file extension. Do I have to mount it?

VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd
# fdisk -ul VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd
Blocks Id System
VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd1 8192 1535999 763904 5 Extended
VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd4 * 32 8191 4080 4 FAT16 <32M
VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd5 8224 106495 49136 6 FAT16

[Code].....

I am trying to grab some files off this file to create a PXE vmware boot.

View 2 Replies View Related

General :: How To Open The File With Extension .pmd

Apr 26, 2010

How will I open a file with extension .pmd in linux ?

View 7 Replies View Related

General :: Regular Expressions Match 2 File Names?

Nov 20, 2010

How can we do a simple match by regular expressions on two filenames. I plan to use it in the command 'find -regex'

Code:
hosts.txt
ipaddress.txt

View 4 Replies View Related

General :: Unable To Get Basename Of File Without Extension

Mar 4, 2011

Trying to get the basename of a file without the extension, I found this snippet but it just returns command not found twice:

[Code]....

Also tried (with and without the quotes on input and file_ext):

input=$1
file_ext=.${input##*.}
base=`basename "$input" $file_ext`

executed: convert.sh /path/music.wav But it echoes base as music.wav

View 14 Replies View Related

General :: Apache And Php, Force File Extension?

Apr 18, 2011

I am playing with my LAMP server1. why can i access a php file on the server only by typing http://serverip/file with no .php extension on?2. later i tryed to play with .htaccess, but when i uploaded it to the server it just disappeared, why is that

View 4 Replies View Related

General :: Sed Command To Replace File Extension?

Dec 9, 2009

how to use a variable in a sed command, but I can't get the output into a variable.

FILE=readme.txt
now i want to remove the extension of filename
so file woud be:
FILE=readme

my script:

NFILE=`echo $FILE | sed 's/.txt//'`
mv ../out/$FILE ../out/$NFILE
FILE=$NFILE

now when i run my script. i get this unknown character extensions in my new file(NFILE).

View 14 Replies View Related

General :: Compile A Pascal Object File With A .o Extension ?

Mar 27, 2010

I have been trying to compile a pascal file using fpc. I succeeded using the command fpc pas1.pas, but this gave me a new object file pas1.o. How do i compile this file to get my output. gcc -o pas1.o does not work.

View 2 Replies View Related

General :: Make A Default Application Open A Certain Extension File?

Nov 3, 2010

I know this is possible in GUI gnome. But is it possible to do it too in shell command? Let say if i type this in shell:

#file.txt

then it will open gnome-editor in nautilus which open file.txt. gnome is the desktop manager. nautilus is the explorer windows in gnome. gnome-editor is one like notepad in MS windows.

View 1 Replies View Related

General :: Rename Multiple File By Moving Part Of The Name To End Of Extension?

Aug 26, 2009

How do you rename:

abc123.txt
abc124.txt
abc125.txt

to

abc.txt.123
abc.txt.124
abc.txt.125

Basically, I want to move the digits from the filename to after the extension.

It works for one file if I type:
rename 123.txt .txt.123 abc.txt.123

but I have thousands of files like these.

View 1 Replies View Related

General :: Move Folders That Contain A File With A Specific Extension To A Destination Folder?

Oct 3, 2010

Many years ago, I converted a portion of my files to an arbitrary format with a specific extension. i no longer desire to have them in this format and i would like begin the process of replacing them because conversion is not an appropriate solution. unfortunately, they are mixed in separate folders of the same root folder with files in my current format of a different extension. I feel it would make this process easier if I were to move every folder that contained a file with the undesired format to a separate root folder. The files are stored on a Linux server and shared via samba. How can I do this with a couple of commands or a script? I am open to other suggestions as well. I want to avoid time spent editing text files. Ultimately, I'd like a command that produced a list of full paths for folders, sorted by the number of levels would be a nice touch. A list of all of the files is clearly not what I'm looking for.

View 2 Replies View Related

General :: Split A Gzip File Based On Size And Have A Prefix Without Changing Extension?

Jan 18, 2010

have a gzip file ABC_000023232.gzipBCD_023232032.gzipI want to split these files into smaller files but keep the extension same because I am using this as a variable in a script

Code:
for i in `ls *.gzip`
split -b 500K $i $i

[code]...

View 3 Replies View Related

Ubuntu :: File Extension Z - Unix Compressed Archive File?

May 6, 2010

Anyone know how to compress a file to extension z?not tar.gz , zip, 7zip

View 6 Replies View Related

Programming :: Match Datetime By The Minute (not An Exact Match By The Second)

Oct 21, 2010

I have the following query:

Code:
$sql="SELECT table1.datetime, table1.user_id, table2.ip, FROM table1,table2 WHERE id='$id' AND (table1.id = table2.id AND table1.datetime = table2.datetime)";

In table2 the datetime fields are about 1 to 2 seconds off due to the source of the data, which I cannot change.

Is it possible via a query match table1.datetime & table2.datetime by HH:MM (ie. to the minute instead of to the second)?

View 1 Replies View Related

Programming :: Sed Match Last X Lines Of A File

Mar 17, 2009

I'm trying to find the correct sed syntax to match from a given pattern to the end of the file and then append that pattern to the end of the file.

I was trying:

But that prints each line right after its original occurrence. I want to match the block and then append it to the end of the file.

View 12 Replies View Related

Programming :: File Renaming Based On A Pattern Match

Jan 8, 2011

What I am attempting to do is rename some television shows into the format that my PVR will understand for the naming convention. I have a script that cleans them up about 95%, now I just cant figure out the last little detail..

For example: NCIS_01.mkv
I think it can be done in sed, but I just figure out how. I need it to be renamed to: NCIS_s01e01.mkv

How can I make sed (or something else) match the last "_" and any numbers after it until the period and then insert text between them reliably?

Depending on the show, it can be something like: This_show_name_243.avi so I need it to be more flexible than I can figure out how to do..

View 6 Replies View Related

OpenSUSE :: Read A File With An .odc Extension?

Sep 10, 2010

I trying to read a file with an .odc extension.Using openOffice Calc, However there is a of garbage and irreadable characters, I found out it is a Microsoft office data connection file. Is there a way around it?

View 4 Replies View Related

Ubuntu :: Open And Run File With Extension Nds?

Jun 26, 2010

How to open and run file with extension nds in ubuntu linux?

View 1 Replies View Related

Ubuntu :: Hiding The JAR File Extension?

May 5, 2011

I installed Minecraft and I want to hide the .JAR extension on the file on my desktop. I tried just renaming it and deleting the ".jar" from the name, but when I tried opening it, it opened as an archive, rather than an executable, even though I had the "Allow executing file as program." box checked off. What can I do to hide the extension?

View 1 Replies View Related

Ubuntu :: AWN File Browser Launcher Doesn't Match Theme

Jun 2, 2010

It doesn't matter what theme I use, the AWN file browser launcher applet always looks the same...I strongly dislike inconsistencies.

View 6 Replies View Related

Ubuntu :: No Free Space , File Size Doesn't Match / Fix It?

Feb 17, 2011

In trying to solve a friend's lack of foresight, i have currently disabled my system.
I was using dd_rescue to make a copy of a drive with a corrupt and unfixable Partition Table. I was a fool, and had a drive mounted to /media/Storage, but ran the backup to /media/storage.
Thus, dd_rescue completely filled my primary drive before informing me that there was a problem.
I don't really trust myself with command line work, so I foolishly sudo'ed nautilus and deleted the folder /media/storage.
Unfortunately, I didn't realize it, but the available space on the drive still read 0bytes.
I tried Terminal work to do a sudo apt-get clean command, but for some inane reason, the laptop screen won't support the display setting for the Terminal login, so I just had to hope that I was doing it right.
I wasn't, and decided to try working from a Live CD so I could see what I was doing.
the folder /root/.Trash/ doesn't exist on Ubuntu's install drive, and I can't figure out why the properties of the drive say "contents: 241310 files, 3.7 GB" but also "Total capacity: 52.8 GB. Free space: 0 bytes"

Any suggestions on how I can get this to shake out?

View 3 Replies View Related

Programming :: Using Key To Match Against Source.txt File To Add Xml Tags To Names In Perl

Jun 21, 2010

Using a list of names (over 4000 of them) painstakingly gleaned from the source file years ago for a database file, I want to match the names against the source file so that they can be updated with the tags <forename></forename> in the original source file.

I placed the list of names in @forenames (only posted a few of them here).

Perl script is:

I am able to get the name bracketed by the tags to appear on the console screen but don't know how to apply the output to the source file. Perhaps I need to do a match on the words then some kind of edit to surround the matching words with the xml tags? I'm a rank novice doing this as a labour of love for a friend.

View 3 Replies View Related

Ubuntu :: The File Extension .pdf Appears In The Filename?

Apr 2, 2010

How to make sure that when I save a pdf file, the file extension .pdf appears in the filename? Its a silly little thing, but annoying. The file browser recognises it afterward as a pdf file though, it opens with document viewer ok.

View 9 Replies View Related

Ubuntu :: Cups-pdf Printing No Extension On File?

Apr 24, 2010

I am running 10.04 beta2 and have installed cups-pdf printing. I can print to the PDF printer and it works fine saving the file to ~/PDF. It saves it with the PDF extension as expected. I am trying to save the file by default to a windows share. I changed the DEVICE URI line to smb://HOME/SERVER/PDF. When I print, the job shows up on the windows share but without a PDF extension

View 8 Replies View Related

Ubuntu :: Common Dat A Format - .pub File Extension

Jul 8, 2010

I have received a file in CDF V2 format (.pub file extension).

Is there any software available to read this file in Linux (Ubuntu)?

View 2 Replies View Related

Ubuntu :: Cannot Play Video File With Extension .vob?

Aug 2, 2010

When trying to play videothe extension .vob,the following message :pa_stream_writable_size () failed. Connection terminated. I tried to follow the tread associated with that error message with little luck. Following that thread led to the following command:sudo pulseaudio --killWhen I executed that command I got the following:E: core-util.c: Home diectory home/username not oursE:main.c: failed tokill daemon: permission denied

View 6 Replies View Related

Ubuntu :: Selecting Certain File Types By Extension

Mar 6, 2011

I am trying to move files from one folder to another based on their file extension. I can do it with a single extension, but I want to match multiple.

Example:

This works, but I want it to not only match mov, but also mpg, flv, mp4, etc. I would think something like [mov,mpg,flv] would work, but it doesn't.

View 4 Replies View Related

Red Hat / Fedora :: File Extension Executable In RHEL 5?

Jan 4, 2010

As we have executeable file extensions .exe , .msi and .msp for Windows. What is the file extension that is executable in Linux RHEL 5

View 3 Replies View Related

Software :: OTS File Extension - Cannot Open Directly

Feb 8, 2010

All files I save, now have to have the OTS file extension, and I cannot open them directly. I have to go through Open Office Org. My computer has also slowed down. Whether this is associated I don't know. Could this be a Bug, and if so how can I correct this problem?. My OS is Fedora 10.

View 2 Replies View Related







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