spirospap$ cat tester1
#!/bin/ksh
ls LC* | cut -c 1-21 | sort -u | xargs mkdir -p
for dir in */
do for file in "${dir%/}"?*
do [ -f "$file" ] && mv -v "$file" "$dir"
done
Thanks!
Moderator's Comments:
Please use CODE tags (not ICODE tags) for full-line and multi-line sample input, output, and code segments.
Last edited by Don Cragun; 02-15-2016 at 02:43 PM..
Reason: Change ICODE tags to CODE tags.
Hello, this is probably another really simple tasks for most of you gurus, however I am trying to make a script which takes an input, greps a specific file for that input, prints back to screen the results (which are directory names) and then be able to use the directory names to move files.... (1 Reply)
I want to move the files in a dir to different dirs based on their file names.
Ex: i have 4 different files with name -
CTS_NONE_10476031_MRL_PFT20081215a.txt
CTS_NONE_10633009_MRL_PFT20091020a.txt
CTS_NONE_10345673_MRL_PFT20081215a.txt
CTS_NONE_10872456_MRL_PFT20091020a.txt
and the 1st... (2 Replies)
I want to move the files in a dir to different dirs based on their file names.
Ex: i have 4 different files with name -
CTS_NONE_10476031_MRL_PFT20081215a.txt
CTS_NONE_10633009_MRL_PFT20091020a.txt
CTS_NONE_10345673_MRL_PFT20081215a.txt
CTS_NONE_10872456_MRL_PFT20091020a.txt
and the 1st... (4 Replies)
Hello,
I need help finding a script that will allow me to move files from one directory to another directory 10k files at a time.
I have a directory that has 100 K files in it. I need to have those 100k files broken apart to separate directories each with 10k files in them.
Here is the... (8 Replies)
Hi,
I have various log files in different paths. e.g.
a/b/c/d/e/server.log
a/b/c/d/f/server.log
a/b/c/d/g/server.log
a/b/c/h/e/server.log
a/b/c/h/f/server.log
a/b/c/h/g/server.log
a/b/c/i/e/server.log
a/b/c/i/e/server.log
a/b/c/i/e/server.log
and above these have an archive folder... (6 Replies)
Hi All,
I have a requirement, I had a parent directory Land under that we have sub directories
Yesterday,
Today and
Tommorrow
And we have a file test.txt under the above directories Yesterday, Today and Tommorrow
The data in the file test.txt under Yesterday folder is ... (5 Replies)
I have just purchased my first ever Apple computer - and am therefore new to UNIX also.
I would like to create a simple "batch file" (apologies if this is the wrong terminology) to do the following:
When I plug my camera into the MAC it automatically downloads photos and videos into a new... (1 Reply)
I would like to transfer all files ending with .log from /tmp and to /tmp/archive (using find )
The directory structure looks like :-
/tmp
a.log
b.log
c.log
/abcd
d.log
e.log
When I tried the following command , it movies all the log files... (8 Replies)
I've got this script to loop through all folders and move files that are more than 2 years old. I'm using the install command because it creates the necessary directories on the destination path and then I remove the source. I'd like to change the script to use the mv command since it is much... (4 Replies)
Hello,
I'm a first time poster looking for help in scripting a task in my daily routine. I am new in unix but i am attracted to its use as a mac user.
Bear with me...
I have several files (20) that I manually drag via the mouse into several named directories over a network. I've used rsync... (14 Replies)
Discussion started by: SonnyClark
14 Replies
LEARN ABOUT DEBIAN
nmlc
NMLC(1) BSD General Commands Manual NMLC(1)NAME
NMLC -- A compiler from NML code to NFO and/or GRF files.
SYNOPSIS
nmlc [options] [file]
OPTIONS -c Crop extraneous transparent blue from real sprites.
-u Save real sprites uncompressed to GRF files. This saves a lot of time during encoding but it's not recommended when creating a
file for distribution since it makes the output file substantially bigger.
--grf=file Write output in GRF format to <file>.
--nfo=file Write output in NFO format to <file>.
--nml=file Write output in NML format to <file>.
--output=file | -o file
Write output to <file>. The output type is detected from the extension of the filename. It must be one of nfo, nml or grf.
--debug | -d
Print a dump of the AST to stdout.
--help | -h
Print usage information.
--stack | -s
Dump stack when an error occurs
--custom-tags=file | -t file
Load custom tags from <file> [default: custom_tags.txt]
--lang-dir=dir | -l dir
Load language files from directory <dir> [default: lang]
--default-lang=file
The default language is stored in <file> [default: english.lng]
--sprites-dir=dir | -a dir
Store 32bpp sprites in directory <dir> [default: sprites]
--start-sprite=file
Set the first sprite number to write (do not use except when you output nfo that you want to include in other files).
--palette=palette | -p palette
Force nml to use the palette <pal> [default: ANY]. Valid values are 'DOS', 'WIN', 'ANY'.
SEE ALSO
The language reference at http://hg.openttdcoop.org/nml/raw-file/tip/docs/index.html
AUTHOR
NML was written by Albert Hofkamp, Jasper Reichardt, Ingo von Borstel, Jose Soler and Thijs Marinussen.
This manual page was written by Thijs Marinussen.
June 18, 2011