File containing spaces on their name can be specified with an escape character [at least this works in tcsh] in this manner:
This fragment erases the file named " file name.txt"
I have a freebsd box with a smb connection to a Windows server - I use rsync to copy specific directories, and files, between the two.
The problem is the Windows box has files with space characters in their filenames and rsync fails to copy these. Reading the documentation of rsync it appears it... (3 Replies)
Hello,
Im using cygwin app which we use the bash shell for scripting.
Im trying to read a filename with consecutive spaces on the filename
ex: filename<space><space>1.txt
ls -lrt filename<space><space>1.txt is working but when I pull that from a file and place it into variable. it reads... (1 Reply)
Hi all,
I have a list of xml file. I need to split the files to a different files when see the <ko> tag.
The list of filename are
B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml
B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml
B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml
... (3 Replies)
our user creates a text file with a white space on the filename. this same file is transfered to unix via automation tool. i have a korn shell script that reads these files on a input directory and connects to oracle database to run the oracle procedures which will load the data from each of the... (2 Replies)
Hello,
Trying to iterate over set of file in current directory and check if the file name in that folder matches certain string. This is what I have so far. Here I am checking if the file name starts with nexus, if so echo file name to log file.
Getting weird syntax errors. Any help is... (7 Replies)
Hi,
I am working in solaris.I am using below script to copy the files from /usr/tmp to /usr/gm
But while running this it is not considering the files list after the filename having space in them.
Example:-
compile_custom_pll.sh
conv_data_sqlload.sh
conv_sqlload.sh
Copy of... (5 Replies)
`echo $file | sed 's/ / /g'`
Hey guys I want help in converting the spaces in my file names to '\ ' .
Example:
UK maps --> UK\ maps
Could someone please help me.
I have tried the following sequences already (none of them work):
1)s/ /\ /g
2)s/ /\\ /g
3)s/ /\\\ /g
Can someone... (7 Replies)
This is on a CentOS box, I have two scripts that need to run in order.
I want to write a shell script that calls the first script, lets it run and then terminates it after a certain number of hours (that I specify of course), and then calls the second script (they can't run simultaneously) which... (3 Replies)
Hello all,
I would like to find files where the filename ends with a space - like Test.dat
I tried it with:
#!/bin/bash
for file in $(find . -name 'Test.dat*')
do
echo "($file)"
done
I found the file I have searched for - but unfortunately the output is as:
(Test.dat) But I... (11 Replies)
Hello,
Normally below script works, could you please comment out what could be the reason of failure if there are spaces in input filename:
script.sh
#!/bin/bash
cd /home/hts/.hts/tvh/
file="$1 $2 $3 $4"
read -d $'\x04' name < "$file"
/usr/bin/ffmpeg -i ""$name"" -vcodec copy -preset... (1 Reply)
Discussion started by: baris35
1 Replies
LEARN ABOUT PHP
is_writable
IS_WRITABLE(3) 1 IS_WRITABLE(3)is_writable - Tells whether the filename is writableSYNOPSIS
bool is_writable (string $filename)
DESCRIPTION
Returns TRUE if the $filename exists and is writable. The filename argument may be a directory name allowing you to check if a directory
is writable.
Keep in mind that PHP may be accessing the file as the user id that the web server runs as (often 'nobody'). Safe mode limitations are not
taken into account.
PARAMETERS
o $filename
- The filename being checked.
RETURN VALUES
Returns TRUE if the $filename exists and is writable.
EXAMPLES
Example #1
is_writable(3) example
<?php
$filename = 'test.txt';
if (is_writable($filename)) {
echo 'The file is writable';
} else {
echo 'The file is not writable';
}
?>
ERRORS /EXCEPTIONS
Upon failure, an E_WARNING is emitted.
NOTES
Note
The results of this function are cached. See clearstatcache(3) for more details.
Tip
As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to "Supported Protocols and Wrappers" to determine
which wrappers support stat(3) family of functionality.
SEE ALSO is_readable(3), file_exists(3), fwrite(3).
PHP Documentation Group IS_WRITABLE(3)