02-16-2010
Yes, I do.
It is removing the files, I just want to get rid of the error output to the terminal.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Does anyone of you know how to turn off color and weird characters on bash shell when using the command "script"? Everytime users on my server used that command to record their script, they either couldn't print it because lp kept giving the "unknown format character" messages or the print paper... (1 Reply)
Discussion started by: Micz
1 Replies
2. Shell Programming and Scripting
Ok, i've been messing around in debian the past few days, setting up programs like subversion, mysql and logrotate. The purpose of this script is to use subversion to backup the binary logs. It runs in the cron every 2 hours or so (although I can't get my script to run properly atm, which is why... (1 Reply)
Discussion started by: cganly
1 Replies
3. Shell Programming and Scripting
Hi all,
How to:
Run a bash script, display on the screen and save all information in a file including error information.
For example:
I have a bash script called test.sh
now I want to run the test.sh and display the output on the screen and save the output including error info to a file.
... (1 Reply)
Discussion started by: Damon sine
1 Replies
4. Shell Programming and Scripting
Hello kind programmers :)
I am a newbie and running into an error "line 28: syntax error: unexpected end of file" on the script shown below. Any help would be greatly appreciated. Thanks!
#! /bin/bash
if ($#argv <3) then
echo 'Usage get_modis_snow '
echo 'ftp script for MYD10A2... (2 Replies)
Discussion started by: cmshreve
2 Replies
5. Shell Programming and Scripting
I would like to remove comments from a bash script. In addition, I would like to remove lines that consist of only white spaces, and to remove blank lines.
#!/bin/bash
perl -pe 's/ *#.*$//g' $1 | grep -v ^]*$ | perl -pe 's/ +/ /g' > $2
#
# $1 INFILE
# $2 OUTFILE
The above code... (10 Replies)
Discussion started by: LessNux
10 Replies
6. Shell Programming and Scripting
Hi,
This should be a simple one: I run the following commands in bash and ksh respectively but got differenant results:
# ls -l /var/log > /tmp/a
# vi /tmp/a
In bash shell, I got:
^
In ksh, I got:
total 828552
-rw-r----- 1 root root 189 Aug 9 00:00 acpid
-rw-r----- 1 root... (7 Replies)
Discussion started by: aixlover
7 Replies
7. Shell Programming and Scripting
Ok, so I have a bash script with an embedded expect statement.
Inside of the expect statement, i'm trying to pull all of the non-comment lines from the /etc/oratab file one at a time.
Here's my command:
cat /etc/oratab |sed /^s*#/d\ | awk 'NR==1'|awk -F: '{print \"$1\"}'|. oraenv
Now,... (0 Replies)
Discussion started by: alexdglover
0 Replies
8. Shell Programming and Scripting
I am connecting to sql databases through shell script. Databases that i am connecting will need password change every 60 days. This is according to our security policy and cannot be changed. But this is creating problem when connecting to Databases through shell script . To connect to oracle DB we... (2 Replies)
Discussion started by: pallvi_mahajan
2 Replies
9. Shell Programming and Scripting
The below bash runs clamav on all files in DIR and produces virus-scan.log. My question is the portion in bold is supposed to move the infected files, lines not OK, to /home/cmccabe/quarantine. Does the bash look correct? Thank you :).
virus-scan.log
Mon Jan 16 14:39:05 CST 2017... (5 Replies)
Discussion started by: cmccabe
5 Replies
10. Programming
hi all,
this is my script and as you can see in the screenshot i attach its not deleting the directory in the source folder
#!/bin/bash
cd /vol/cha-work/_ARCHIVE/to_be_archived/audio/robert_test
temp=/mnt/robert_test/temp
dest=/vol/cha-archive/audio
echo "is this archive for an... (2 Replies)
Discussion started by: robertkwild
2 Replies