Hi All,
I need help to create a shell script that does following:
- do ls -1 and let all file names in the current folder
- do wc for each file and if wc > 0 then send a mail.
I am new to unix and do not know how to get filename one by one in a loop, so that wc can be done. I have done rest... (5 Replies)
I want to check the files in particular directory are more that 0 Bytes i.e, Non zero byte file. The script should print a msg if all the files in that directory are empty( 0 Byte). (2 Replies)
I'm sure this can't be too tough, but.
I want to check the existance of file(s) by extension. There may be 0,1,N files. If any files exist, then remove them.
Thanks for any insight. (3 Replies)
Hi all,
I have the following code:
if ; then echo 'folder not exist'; else echo 'folder exist'; fi
The "testing" folder is not exist in /home/batch , but thhe result is 'folder exist'. It seems that the code cannot detect that the folder "testing" not exist.
ANybody know the... (1 Reply)
I am trying to execute the following command to check the existance of a file (which has a date timestamp on it). If there are more than one file, then also it should give me 'success' result.
if
then
<do some work>
else
<no files>
fi
Since there are more than one... (18 Replies)
Kindly help on below script:
<<
i='find ...'
if then
echo 'File Exists'
else
echo 'File Does Not Exist'
>>
If i has some file name then it runs properly but if i has nothing ( blank value) then it throws an error. I dont exactly remember right now but error seems like:... (2 Replies)
Hi Team,
I'm new to Unix shell scripting .
I've the following requirement
A folder contains the list of files with the following format
ab.name.11.first
ab.name.12.second
ab.name.13.third
----------
I have to rename the above file to like below
... (6 Replies)
Hi,
I have 9 files which are generated dynamically & if there is a some condition which doesn't meet the criteria then file is not created or is of zero size.
so further i am unable to consolidate the files based on following code 1
awk -F, -v ptime="201407" 'FNR==1... (3 Replies)
I have a folder that contains many sub folders and files. This tree has to be backed up to an archive system. According to the tech support, one of the archives is failing to back up due to the possibility of trailing spaces on file and folder names. Therefore, I would like to have a script... (16 Replies)
Hi All,
Seeking for your assistance to compare if the file in working directory is found on the DIR2 directory and if not found move the file in DIR2.
ex. WORKING_DIR=/home/dir1/
file1.txt
DIR2=/home/admin/users
file1.txt
what i did was
found_nonempty=''
for file in... (4 Replies)
Discussion started by: znesotomayor
4 Replies
LEARN ABOUT DEBIAN
radsqlrelay
RADSQLRELAY(8) FreeRADIUS helper program RADSQLRELAY(8)NAME
radsqlrelay - relay SQL queries to a central database server
SYNOPSIS
radsqlrelay [-?] [-d sql_driver] [-b database] [-f file] [-h host] [-u user] [-P port] [-p password] [-1] [-x] file_path
DESCRIPTION
radsqlrelay tails a SQL logfile and forwards the queries to a database server. Used to replicate accounting records to one (central) data-
base, even if the database has extended downtime.
The SQL logfile is created by the rlm_sql_log module. The module must be configured in the radiusd server before you can use radsqlrelay.
OPTIONS
-? Print usage help information.
-d sql_driver
Driver to use: mysql, pg, oracle.
-b database
Name of the database to use.
-f file
Read password from file, instead of command line.
-h host
Connect to host.
-u user
User for login.
-P port
Port number to use for connection.
-p password
Password to use when connecting to server.
-1 One-shot mode: push the file to database and exit.
-x Turn on debugging.
file_path
The pathname of the SQL logfile to use.
NOTES
Oracle driver
The command "radsqlrelay -d oracle -b db.domain.tld sql-relay" reads the database description stored in $TNS_ADMIN/tnsnames.ora:
db.domain.tld =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = db.domain.tld)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = <DB SID>)
)
)
SEE ALSO rlm_sql_log(5)AUTHOR
Nicolas Baradakis <nicolas.baradakis@cegetel.net>
19 June 2005 RADSQLRELAY(8)