Sponsored Content
Top Forums Shell Programming and Scripting executing script shows some warnings Post 302566515 by felipe.vinturin on Thursday 20th of October 2011 01:29:53 PM
Old 10-20-2011
Please, try this one:
Code:
#!/bin/sh -x
while read DAYS INDIR OUTDIR
do
echo "[${DAYS}] [${INDIR}] [${OUTDIR}]"
find ${INDIR} -type f -mtime ${DAYS} -exec mv {} ${OUTDIR} \;
done < ./tarconfig.sh

You can see two differences in this one:
-----> "#!/bin/sh -x" in the first line (you can use it as "set -x"), more verbose
-----> All variables enclosed with: "${}"

I also tried in my cygwin and no error!

---------- Post updated at 15:29 ---------- Previous update was at 15:28 ----------

You will see something like:
Code:
$ ./teste.sh
+ read DAYS INDIR OUTDIR
+ echo '[0] [./files] [./output]'
[0] [./files] [./output]
+ find ./files -type f -mtime 0 -exec mv '{}' ./output ';'
+ read DAYS INDIR OUTDIR

I hope it helps!
This User Gave Thanks to felipe.vinturin For This Post:
 

9 More Discussions You Might Find Interesting

1. AIX

Sysback Warnings

I am currently running backups using an entry in the crontab redirection the output to a file. From time to time I get a backup complete with Warnings but don't know what the warnings are and they don't appear in the file. Where can I view the warings? Is there a command to view the warnings? ... (2 Replies)
Discussion started by: daveisme
2 Replies

2. Shell Programming and Scripting

need to extract warnings and cautions

I need to extract all "text" from within <WARNING>text</WARNING> and "text" from within <CAUTION>text</CAUTION> tags in an SGML file. I need this separated or formatted in a file so that I can copy and paste the warnings and cautions into a table. Looking for ideas. Thanks. (4 Replies)
Discussion started by: ScotRite
4 Replies

3. Shell Programming and Scripting

Suppress awk warnings

Hello everyone, Sorry if this is a bit of an RTM thing, but I can't find any flags for suppressing warnings with awk and Googling (this site too) didn't yield much useful. Does anyone know how to suppress warnings? The warning I'm specifically trying to remove is one warning me that I'm... (1 Reply)
Discussion started by: kdelok
1 Replies

4. Solaris

Not getting warnings!!

I have tried to compile the code on solaris which is bash-3.00$ uname -a SunOS zen 5.7 Generic_106541-37 sun4u sparc SUNW,Ultra-80 bash-3.00$ CC -V CC: WorkShop Compilers 5.0 98/12/15 C++ 5.0 when I compile just a simple program, int main() { long kk = 200; int jj = kk; return... (0 Replies)
Discussion started by: amit_27
0 Replies

5. AIX

Warnings in AIX

Dear experts, please help in this regard, when i am trying to compile some files for 64 bit in AIX, iam getting this warning "/usr/include/alloca.h", line 34.9: 1540-1401 (I) An unknown "pragma __alloca" is specified. how to solve this warning , what is the significance of this please... (1 Reply)
Discussion started by: vin_pll
1 Replies

6. UNIX for Advanced & Expert Users

Executing a shell script from windows;script present in unix

I need to execute a shell script kept in unix machine from windows. User id, password area available. For eg. There's a shell script wich moves all the logs kept in my home directory to a directory named LOGS. Now i need to get this done through windows; either using a batch file, or java... (4 Replies)
Discussion started by: rajneesh_kapoor
4 Replies

7. Shell Programming and Scripting

How to handle errors and warnings

Hi Guys, I am working on a shell script(main script) where in i have to call another script B and pass parameter to that script. I see that the shell script that is being called in the main script is throwing warnings/fatal errors. So i am just wondering how do i capture these and ask the script... (1 Reply)
Discussion started by: stunnerz_84
1 Replies

8. Shell Programming and Scripting

Infinite while loop script shows more than one process

Hi, I have a script which triggers an infinite loop. #!bin/bash trig=`ls /home/trig.tch |wc -l` function callj { some commands... } while do callj & done The number of process after doing a ps -ef |grep Mon.sh returns processes even after the script is killed by deleting the... (4 Replies)
Discussion started by: chetan.c
4 Replies

9. Shell Programming and Scripting

• Write a shell script that upon invocation shows the time and date and lists all the logged-in user

help me (1 Reply)
Discussion started by: sonu pandey
1 Replies
RIVET-CHOPBINS(1)						   User Commands						 RIVET-CHOPBINS(1)

NAME
rivet-chopbins - Strip specified bins from data sets. SYNOPSIS
rivet-chopbins -b <HISTO/PATH:min:max> [ -b ... ] <AIDAFILE> [...] DESCRIPTION
Strip specified bins from data sets. Histograms not specified will be passed through without any chopping. Bins to be kept can be specified on command line `-b' options. To chop bins from different observables can be achieved by using the `-b' option multiple times. OPTIONS
-h, --help show this help message and exit -b BINS, --bins=BINS Specify a histogram and bin range that is to be kept. The format is `AIDAPATH:start:stop'. -O OBSFILE, --obsfile=OBSFILE Specify a file with bin-definitions to chop -o OUTDIR, --out=OUTDIR output directory (default: .) -i, --in-place Overwrite input file rather than making inputchop.aida Example: rivet-chopbins -b /ALEPH_1996_S3486095/d03-x01-y01:0.095:0.27 out.aida This will give you the all bins of the ALEPH 1-T distribution that are between the bins that contain the x-values 0.095 and 0.27. AUTHOR
This manual page was written by Lifeng Sun <lifongsun@gmail.com> for the Debian system (but may be used by others). Rivet June 2012 RIVET-CHOPBINS(1)
All times are GMT -4. The time now is 03:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy