Hi Good people :D
How do I check if a directory exists, if it does then carry on rest of the script, otherwise exit.
-------------
cd $mainfolder/system1
#unzips files arrived in last 24 hrs into temp directory
find * -mmin -1440 -exec unzip {} \;
I'd like to check here if temp... (2 Replies)
Hi folks!
First off I'm working with a Sybase DB.
I'm using you're basic ISQL command to connect to my Sybase DB...
isql -S$DB_SERVER -D$DB_NAME -U$DB_USR -P$DB_PWD <<!EOF > $log_file
My question is, is there a way to determine if a database exists using shell script?
For example, if... (2 Replies)
Hi. I'd like to have an IF-Then-Else statement where I can check to see if a file exists? We have the Bourne Shell by default. I'm looking for the syntax to do something like this:
if myfile.txt exists then
...my code
else
...my code
end if
Any help would be greatly... (5 Replies)
i writing a program that checks if any .txt files exist in the current directory if it does, then it lists the files...
i have got everything right, except the validation part doesnt work!
....
if
then
ls *.txt
else
echo "file not found"
everytime it tells me file not found!!
by... (3 Replies)
Hi
#Testing for file existence
if ; then
echo 'SCHOOL data is available for processing'
else
echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING'
:
i wrote a script, where it begins by checking if file exists or not.
If it exists, it truncates the database... (2 Replies)
Hello,
May i please know how do i check if the given input argument is one of the listed numbers then success else failure. I am using bash shell.
if
then
echo "success"
else
echo "failure"
fi
Thank you. (2 Replies)
Hi,
I need to check if the URL exists.
Below is my OS:
SunOS mymac1 Generic_148888-04 sun4v sparc SUNW,SPARC-Enterprise-T5220
I do not have the curl set in the profile nor am i aware about its path.
But i have wget. Please help me with params for the same.
Can you help me check if... (6 Replies)
Hi,
I want to check if the file exists or not in the directory.
i am trying below code but not working.
File="/home/va59657/Account_20090213*.dat"
echo "$File"
if ]; then
echo "file found"
else
echo "file not found"
fi
However i am getting file not found even if file exits as... (5 Replies)
Hi,
I have the below code written. However I am not getting the desired output
I am checking if the particular path has file in it.
#!/bin/bash
ls -l /IRS2/IRS2_ODI/INFILE/*LS* 1>/dev/null 2>/dev/null
if
then
echo $?
echo "File Exists"
fi
... (3 Replies)
I need to check whether a file exists and has been changed.
The file should contain a specific string. The file should also have been changed within the last ten seconds.
How do I do that? (3 Replies)
Discussion started by: locoroco
3 Replies
LEARN ABOUT DEBIAN
dpkg::compression::process
Dpkg::Compression::Process(3) libdpkg-perl Dpkg::Compression::Process(3)NAME
Dpkg::Compression::Process - run compression/decompression processes
DESCRIPTION
This module provides an object oriented interface to run and manage compression/decompression processes.
METHODS
my $proc = Dpkg::Compression::Process->new(%opts)
Create a new instance of the object. Supported options are "compression" and "compression_level" (see corresponding set_* functions).
$proc->set_compression($comp)
Select the compression method to use. It errors out if the method is not supported according to "compression_is_supported" (of
Dpkg::Compression).
$proc->set_compression_level($level)
Select the compression level to use. It errors out if the level is not valid according to "compression_is_valid_level" (of
Dpkg::Compression).
my @exec = $proc->get_compress_cmdline()
my @exec = $proc->get_uncompress_cmdline()
Returns a list ready to be passed to "exec", its first element is the program name (either for compression or decompression) and the
following elements are parameters for the program.
When executed the program acts as a filter between its standard input and its standard output.
$proc->compress(%opts)
Starts a compressor program. You must indicate where it will read its uncompressed data from and where it will write its compressed
data to. This is accomplished by passing one parameter "to_*" and one parameter "from_*" as accepted by Dpkg::IPC::spawn.
You must call "wait_end_process" after having called this method to properly close the sub-process (and verify that it exited without
error).
$proc->uncompress(%opts)
Starts a decompressor program. You must indicate where it will read its compressed data from and where it will write its uncompressed
data to. This is accomplished by passing one parameter "to_*" and one parameter "from_*" as accepted by Dpkg::IPC::spawn.
You must call "wait_end_process" after having called this method to properly close the sub-process (and verify that it exited without
error).
$proc->wait_end_process(%opts)
Call Dpkg::IPC::wait_child to wait until the sub-process has exited and verify its return code. Any given option will be forwarded to
the "wait_child" function. Most notably you can use the "nocheck" option to verify the return code yourself instead of letting
"wait_child" do it for you.
AUTHOR
Raphael Hertzog <hertzog@debian.org>.
1.16.15 2014-06-05 Dpkg::Compression::Process(3)