09-24-2016
Most important question first: Does your script do what it is intended for? If not, post what goes wrong. If yes, here's some comments on it:
- do you really need to run it continuously, i.e. will any of the files AAA*/BBB*/CCC* be recreated periodically?
- while [ 1 ] works (creating an infinite loop) as would while [ 0 ]. Is that what you intended to do?
- you want a download as well as an upload. In the same script? Switchable? File names changing?
- you want "specified filenames" to be down-/uploaded. This can be easily done as lines in "here documents" are expanded by the shell. Any idea on how to supply the filenames?
- adding comments is good behaviour in programming, but try to be more illustrative, don't state the obvious.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to write a shell script to delete logs generate by db when space in the folder reaches 70%. i am getting space values from db, find the files at OS and remove them by using a cron job runs every 5minutes.
I have to keep the latest 5 files at any time, my problem is that log files... (3 Replies)
Discussion started by: saha
3 Replies
2. UNIX for Advanced & Expert Users
I am going to take up a position in Data & Network Security.
I would need to write network shell scripts doing the following task:
Going to around 2000 servers and findout which groups has access to each servers and which ids are there in each group that has access.
I need to implement... (1 Reply)
Discussion started by: pinnacle
1 Replies
3. UNIX for Dummies Questions & Answers
Hi friends,
I have a script that sets the env variable path based on different conditions.
Now the new path variable setting should not done in the same terminal or same shell.
Only a new terminal or new shell should have the new path env variable set.
I am able to do this only as follows:
>cd... (1 Reply)
Discussion started by: sowmya005
1 Replies
4. Shell Programming and Scripting
Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP.
I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies
5. Shell Programming and Scripting
Hello All
I have a xml file with many sets of records
like this
<mytag>mydata</mytag>
<tag2>data&</tag2>
also same file can be like this
<mytag>mydata</mytag>
<tag2>data&</tag2>
<tag3>data2&data3</tag3>
Now i can grep & and replace with & for whole file but it will replace all... (4 Replies)
Discussion started by: lokaish23
4 Replies
6. Shell Programming and Scripting
Hi, I have text file abc.txt. In this file, I have the following data.
Input:
Mr Smith & Mrs Smith
Mr Smith &apos Mrs Smith
Mr Smith & Mrs Smith
Mr Smith& Mrs Smith
Mr Smith &Mrs Smith
Output:
Mr Smith & Mrs Smith
Mr Smith &apos Mrs Smith
Mr Smith & Mrs Smith
Mr Smith&... (4 Replies)
Discussion started by: naveed
4 Replies
7. Red Hat
ENVIROMENT
Linux: Fedora Core release 1 (Yarrow)
iPlanet: iPlanet-WebServer-Enterprise/6.0SP1
Log Path: /usr/iplanet/servers/https-company/logs
I have iPlanet log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I... (7 Replies)
Discussion started by: zachs
7 Replies
8. Shell Programming and Scripting
I want to use my script to get any file then delete it once it transfers to my side , I manage to create below script to generate "list" file which contains all file names in "10.10.1.1" then I made "a.out" file which contains the commands that I want to run it on "10.10.1.1" to get & delete the... (2 Replies)
Discussion started by: arm
2 Replies
9. Shell Programming and Scripting
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies
10. Shell Programming and Scripting
ENVIROMENT
Linux: RHEL 6.4
Log Path: /usr/iplanet/servers/https-company/logs
Log Format: user.log.03-15-2015
I have log4j log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I need a script that will run daily that... (1 Reply)
Discussion started by: admin_job_admin
1 Replies
dput(1) General Commands Manual dput(1)
NAME
dput - package upload tool for Debian
SYNTAX
dput [options] [host] package.changes ...
DESCRIPTION
This is a tool for uploading Debian packages into the archive. You may specify to which host it should upload the file by passing it an
host argument. If omitted, dput uses the host specified by default_host (or, historically default_host_non-us) configuration option. Also
you have to pass the program one or more name of package.changes files and then they will be sequentially uploaded.
This program will then upload the package for you into the archive, using a selected upload method. Currently dput supports ftp, scp,
rsync, http, https, and local. The method scripts have been split from the main script so it is easy to add new methods. Look in
/usr/share/dput/ for examples.
Should something go wrong with your upload to destinations using the Debian upload queue daemon (e.g. ftp-master), you can remove files
from the upload queue with dcut(1).
OPTIONS
-c, --config - define a config file to use.
-d, --debug - activate debugging mode, helpful if bugs occur.
-D, --dinstall - do a dry run of dinstall after the upload.
-f, --force - force an upload of an already uploaded package.
-h, --help - print help information and exit.
-H, --host-list - print the lists of hosts that dput knows about.
-l, --lintian - run lintian before the upload.
-U, --no-upload-log - do not write a .upload log file after uploading.
-o, --check-only - check only the package and do not upload.
-p, --print - print the configuration that dput is using.
-P, --passive - use passive ftp instead of active. Note that passive ftp is the default unless specified otherwise in the configuration
file.
-s, --simulate - simulate an upload only.
-u, --unchecked - don't check GnuPG signature on the changes file.
-e, --delayed - Upload to a DELAYED queue, rather than the usual Incoming. This takes an argument from 0 to 15. Note that a delay of 0 is
different from no delay at all.
-v, --version - print version information and exit.
-V, --check-version - check if the user has already installed and tested the package before putting it into the archive.
ENVIRONMENT
This program doesn't depend on any environment variables. But if the variable USER is set, it will be used.
LICENSE
This program is distributed under the terms of the GPL.
BUGS
Please send bug reports to the author.
FILES
/etc/dput.cf
global dput configuration file
~/.dput.cf
peruser dput configuration file
SEE ALSO
dput.cf(5)
dcut(1)
/usr/share/doc/dput
/usr/share/dput
AUTHOR
dput was written Christian Kurz. The current maintainer is Thomas Viehmann <tv@beamnet.de>.
Many other people have contributed to this code. See the Thanks file.
COMMENTS
The author does appreciate comments and suggestions from you.
October 5, 2001 dput(1)