Hello,
When I run following script
#!/bin/bash
cd ~/directory1
mv `ls -trF | grep -v / | tail -10 ` ~/directory2
works fine with filenames not having any space but runs into issues with filenames that have spaces tried with $file variable still doesnot work. Can someone help me (4 Replies)
Hello~
I'm on AIX version 5 and I believe I have the tcsh shell environment to play in. Can you guys help me with a solution to rename all files that have "eclp" in the filename to "ecl" ? I basically want to rename the files and strip the "p" out.
i.e. original filenames:
... (3 Replies)
Hi
I am having difficulty copying files from one dir to another due to a space in the names of the file with an extension .rtf
There are a group of files and the command am using is
cp `ls -rt /wlblive/home/whiops/ops/RTFs/*.rtf|head -20` /wlblive/home/jamshed
Since the files are... (3 Replies)
I have a text file containing files in a directory structure i.e.
/project/hr/raw/jcpdatav/datav_aug03
/project/hr/raw/jcpdatav/comb8121sep02n
/project/hr/raw/jcpdatav/datav_feb04_ons
/project/hr/raw/jcpdatav/corpsick_jun06
/project/hr/raw/jcpdatav/jcpjoiners200507... (3 Replies)
hi!
i want to rename all files with no extension with the extension DAT.
with this command ls |grep -v "\\." i can list files but i dont know how i am going to rename them..
so
i tried
FILE_LIST=ls |grep -v "\\."
for TEST_FILE in ${FILE_LIST}
do
mv $TEST_FILE... (2 Replies)
Hi all,
I've been tangoing with this one for a couple of days now and I'm still not making any progress.
Basically I'm trying to match three numbers in a string from a text file with matching numbers in a jpeg, and then copying the results to another folder.
Data looks like this:
Model:... (4 Replies)
I'm currently only able to perform some very basic functions, so hope this makes sense...
I have a set of about 27 files that need to be renamed from something like this:
000012ABCDEFGHIJ.XXX.YYY.ZZZ
000078KLMNO.XXX.YYY.ZZZ
000099PQ.XXX.YYY.ZZZ
to something like this:
newa012.abc... (11 Replies)
currently in my directories
$ ls -lrth
total 32K
-rw-r--r-- 1 oracle oinstall 864 Feb 25 16:01 cor_bin_gateway_cnt.sql
-rw-r--r-- 1 oracle oinstall 782 Feb 25 16:01 mer_bin_gateway_cnt.sql
I want to rename files with *.sql to *.mv extension, but when I execute the following
$ mv... (1 Reply)
Hi,
I have a list of filenames in the format with Spaces in the filename.
As an example :
Sample File 1.txt
Sample File 2.txt
Sample File 3.txt.....I have about 100 files like this.
I am trying to create a block of code or use an available command to a) Create a file b) Put in some... (2 Replies)
In the below bash processes substitution, if there are 3 files in a directory /home/cmccabe/medex.logs/analysis.log, the filename variable is set to where these files are located.
The code does execute, the problem is that if there is a renamed file in the output directory below, it gets... (0 Replies)