Hi,
I have a data file that lists a number of files. I want to move the files named in that one to another directory. Here's what I have:
#!/usr/bin/perl -w
open(FILE, "<collision.txt");
my @lines=<FILE>;
foreach my $lines (@lines) {
system("mv $lines collisions/.");
}
close(FILE);
... (2 Replies)
Hi there,
I want to compare 2nd column which are alphanumeric values from each of the 2 files i.e.,lspv_pre.out and lspv_post.out , if found echo some message.
lspv_pre.out
hdisk0 00c39eaa451144dd rootvg active
hdisk1 00c39eaa45223322 ... (3 Replies)
Hi
I am want to create a script where the file gets moved from the current folder to a folder transfer based on the oldest first. This script should run one file at a time using a loop. I want it as a loop because I want to do some processing while I have one file. Can anyone guide me on this? (2 Replies)
Hi All,
I am coding for a requirement where I need to read a file & get the values of SUB_DATE. Once the dates are found, i need to move the files based on these dates from one directory to another.
ie, this is how it will be in the file,
SUB_DATE = 20120608,20120607,20120606,20120606... (5 Replies)
Hi,
In a error log file, the error code of a particular error contains both Alphabet and Numbers. My problem statement is to find the error codes from a particular log. That means, I need to search a word, which contains both alphabet and number. Please help me. Below is two examples of error... (1 Reply)
Hello,
Please help me with this!! Thanks in advance!!
I have a file named file.gc with the content:
1-- Mon Sep 10 08:53:09 CDT 2012
2revoke connect from FR2261;
3delete from mkt_allow where grantee = 'FR2261';
4grant connect to FR2261 with '******';
5alter user FR2261 comment... (0 Replies)
Hi,
I have a directory having so many number of files. Now I want to move the files which are older than one month (lets say) from this directory to another directory (say BKP dir).
Simply, if file is olderthan one month move it from source1 dir to BKP1 dir.
My file names doesn't have... (7 Replies)
Hi All,
I have multiple files in the folder, I want to move those files into the other folder on based of name
File names:
Template_server1_01==>
Template_server1_02==>To one directory /Server1
Template_server1_03==>
Template_server2_01==>
Template_server2_02==>To one... (9 Replies)
Hello,
I would like to know if it's a good practice to check the file permissions of the contents of a directory before moving them. For example:
mv -- "$directory"/* "$directory"/.* "$directory"/..?* "$destination"The variables $directory and $destination contain the path to an existing... (6 Replies)
Discussion started by: Cacializ
6 Replies
LEARN ABOUT LINUX
shtoolize
SHTOOLIZE.TMP(1) GNU Portable Shell Tool SHTOOLIZE.TMP(1)NAME
shtoolize - Build individual GNU shtool scripts
VERSION
GNU shtool 2.0.8 (18-Jul-2008)
SYNOPSIS
shtoolize [-h] [-v] [-q] [-o script] module [ module ... ]
DESCRIPTION
The shtoolize program builds individual GNU shtool scripts (written to the default output file "shtool" or to the specified script) out of
one or more shtool ingredient modules. Available modules are:
echo Print string with optional construct expansion
mdate Pretty-print modification time of a file or dir
table Pretty print a field-separated list as a table
prop Display progress with a running propeller
move Move files with simultan substitution
install Install a program, script or datafile
mkdir Make one or more directories
mkln Make link with calculation of relative paths
mkshadow Make a shadow tree
fixperm Fix file permissions inside a source tree
rotate Rotate a logfile
tarball Roll distribution tarballs
subst Apply sed(1) substitution operations
platform Platform identification utility
arx Extended archive command
slo Separate linker options by library class
scpp Sharing C Pre-Processor
version Generate and maintain a version information file
path Deal with program paths
Additionally there is a pseudo-module ``"all"'' which can be used as a short-hand for ``"echo mdate table prop move install mkdir mkln
mkshadow fixperm platform arx slo scpp version path"'', i.e. to build a shtool script with all modules in the standard order. An installed
shtool is usually built this way via ``"shtoolize -o shtool all"''.
Use the shtoolize program to build individual shtool scripts in case you want a smaller sized script and you don't need all of the
available shtool functionality. For instance for the classical Autoconf based free software package a "shtool" script build via
``"shtoolize -o shtool install mkdir"'' might be sufficient.
OPTIONS
The following command line options exist:
-h Displays a short help page describing the usage of shtoolize.
-v Displays the version number of shtoolize/shtool.
-q Displays no processing information.
-o script
Writes the output to file script instead to file ``"shtool"''.
EXAMPLE
The typical free software package which is based on GNU libtool and GNU shtool one uses a "Makefile" entry like the following:
# Makefile entry for upgrading GNU tools
upgrade-tools:
libtoolize -f -c
shtoolize -q all
This upgrades the three files "ltmain.sh", "ltconfig" and "shtool" in the current source tree to the latest versions.
SEE ALSO shtool(1).
AUTHOR
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
18-Jul-2008 shtool 2.0.8 SHTOOLIZE.TMP(1)