Search Results

Search: Posts Made By: gkelly1117
6,525
Posted By Chubler_XL
I have seen some scripts that put the file over...
I have seen some scripts that put the file over with a temporary name then rename. This also protects from jobs on the destination server attempting to process file still in transit.

Once the...
6,525
Posted By Chubler_XL
How about: find $READDIR -type f -name...
How about:

find $READDIR -type f -name '*.ready' | while read file
do
real_file="${file%.ready}"
echo "put $real_file $FTPDIR" >> tde_batch
echo "!rm $real_file" >> tde_batch
cp...
6,525
Posted By Corona688
for I in `ls *` is a useless use of backticks...
for I in `ls *` is a useless use of backticks (http://www.smallo.ruhr.de/award.html#backticks). for I in * does the exact same thing with one fewer command and no unintended side-effects.

You can...
6,525
Posted By RudiC
You'll need to slightly modify Corona688's...
You'll need to slightly modify Corona688's proposal for this: for FR in *.ready
do FILE="${FILE/.ready/}"
[ -e "$FILE" ] || break # Avoids error
echo...
6,525
Posted By Don Cragun
Almost. You used FILE where you needed FR: ...
Almost. You used FILE where you needed FR:
for FR in *.ready
do FILE="${FR%.ready}"
[ -e "$FILE" ] || break # Avoids error
echo "put ${FILE}...
1,264
Posted By Corona688
sudo tail -20 /etc/sudoers ?
sudo tail -20 /etc/sudoers ?
4,020
Posted By Corona688
Just one thing you forgot to change: for...
Just one thing you forgot to change: for ((COUNT=0; N<PINGCOUNT; COUNT++))
38,808
Posted By Don Cragun
Perhaps the following replacement for your script...
Perhaps the following replacement for your script will give you a template showing how you can attack your problem:
#!/bin/bash
source /generic/utils/etc/environments/perm.conf
find $ENVR \(...
38,808
Posted By gacanepa
What do you mean by "environment"? Maybe the...
What do you mean by "environment"?
Maybe the following code snippet can help. In this example, I'm passing a certain file or directory as argument. You can later change that to better suit your...
2,550
Posted By MadeInGermany
Yes, we can.:D If your find statements are...
Yes, we can.:D
If your find statements are exactly the same otherwise, you can combine them to one
find ${d}/backup ${d}/tmp -type f -mtime +3 '(' -name '*.zip' -o -name '*.CSV' -o -name '*.txt'...
2,550
Posted By Corona688
A few changes to suggest: #!/bin/ksh ...
A few changes to suggest:
#!/bin/ksh
#Author:Emmanuel Iroanya Jr
#Date:April 2nd, 2013
#Purpose: The purpose of this is to check data and rollout directory and keep file space optimal.

if [...
2,550
Posted By fpmurphy
Hello, Per our forum rules...
Hello,

Per our forum rules (https://www.unix.com/misc.php?do=cfrules), all threads must have a descriptive subject text. For example, do not post questions with subjects like "Help Me!",...
6,131
Posted By RudiC
Not a genius, just a careful man page reader! ...
Not a genius, just a careful man page reader!

---------- Post updated at 07:50 PM ---------- Previous update was at 07:39 PM ----------

Rats! Found a minor error: it sends out alerts AND...
6,131
Posted By RudiC
When admin users don't need to change their...
When admin users don't need to change their password regularly, you might want to reconsider your site's security policy.
However, you can intercept that - depending on your shell - by using e.g....
6,131
Posted By RudiC
Well, I can't see what your Eval value is, but...
Well, I can't see what your Eval value is, but when I execute # IFS=:; grep syslog /etc/shadow | { read user pw pwchg minpw maxpw Rest; echo "User: $user, days left: $(( pwchg + maxpw - $(date...
6,131
Posted By RudiC
I'd gently propose a new "Useless Use of ELIF"...
I'd gently propose a new "Useless Use of ELIF" award.
And I'm not sure I understand your approach to calculate the delta time until a password change is mandatory. Why don't you calculate the time...
6,131
Posted By nails
It looks to me that your expr syntax error has to...
It looks to me that your expr syntax error has to do with non-numeric data. I don't know what perl program $EpochSh does, but if it doesn't print out a number followed by a colon, you will have...
3,681
Posted By methyl
One of the many methods of finding the top 10...
One of the many methods of finding the top 10 largest files in a directory is as follows:
find "${dir}" -type f -exec ls -lad {} \; | sort -n -r +4 | head -10
# If you have knowledge of the size of...
Showing results 1 to 18 of 18

 
All times are GMT -4. The time now is 05:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy