Running a shell, i.e. creating a new process for each file found may work well on small file counts, but would not be that efficient on large dir trees.
What about using the (deprecated) -path test as Corona688 proposed, execing a mv -t "$dir01"/.LogFiles/ (option -t not present on all systems), followed by a + that collects all filenames found into the mv parameters? Like:
. Give it a shot and report results!
cat .servers | while read LINE; do
ssh jason@$LINE $1
done
exit 1
./command.ksh "ls -l ~jason"
Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing?
Thanks!
JP (2 Replies)
Howdie everyone...
I have a shell script RemoveFiles.sh
Inside this file, it only has two commands as below:
rm -f ../../reportToday/temp/*
rm -f ../../report/*
My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Hello, the ls -d command to only list directories in a directory doesn't seem to work on Solaris and the man command says to use that combination: ls -d
Anyone have the same problem and find a resolve?
Thanks
BobK (9 Replies)
Hi. I've been playing around a bit. This isn't for any practical purpose-- it's really just a theoretical exercise. I wrote this little thing:
foreach num ( 6 5 4 )
awk -v "number=$num" 'BEGIN{for(x=0;x<$number;x++) printf "-"; printf "\n"}'
end
I would expect the following output:
... (3 Replies)
Hi
I have put alias ll='ls -la' in .profile file but it doesn't work.
On hand it works it looks like the .profile file is not beeing read.
How to check whitch file is loaded? ,profile? .bash_profile?
My system: SunOS mion 5.10 Generic
Shell: /bin/pfksh
Thanks (2 Replies)
i want to get the value for column 4rth when i =4. please guide what i am doing wrong. thanks
var=`cat file.csv`
for i in $var; do {
if ; then
var4=$var4+$i
fi
echo $i
}
done
I am geting this error message "0403-009 The specified number is not valid for this command." (8 Replies)
I edited sudoers like this:vi /etc/sudoers
subex ALL =(root) NOPASSWD: /usr/ccs/bin/pstack
But the respective user still is prompted for password, and even when the right password is used, the command is still not launched.$sudo usr/ccs/bin/pstack 26557
We trust you have received the usual... (5 Replies)
Hi,
I am using korn shell.
until ]
do
echo "\$# = " $#
echo "$1"
shift
done
To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work.
Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies
LEARN ABOUT PHP
http_get
HTTP_GET(3) 1 HTTP_GET(3)http_get - Perform GET requestSYNOPSIS
string http_get (string $url, [array $options], [array &$info])
DESCRIPTION
Performs an HTTP GET request on the supplied url.
See the full list of request options.
PARAMETERS
o $url
- URL
o $options
-request options
o $info
- Will be filled with request/response information
RETURN VALUES
Returns the HTTP response(s) as string on success, or FALSE on failure.
EXAMPLES
Example #1
A http_get(3) example
<?php
$response = http_get("http://www.example.com/", array("timeout"=>1), $info);
print_r($info);
?>
The above example will output:
array (
'effective_url' => 'http://www.example.com/',
'response_code' => 302,
'connect_code' => 0,
'filetime' => -1,
'total_time' => 0.212348,
'namelookup_time' => 0.038296,
'connect_time' => 0.104144,
'pretransfer_time' => 0.104307,
'starttransfer_time' => 0.212077,
'redirect_time' => 0,
'redirect_count' => 0,
'size_upload' => 0,
'size_download' => 218,
'speed_download' => 1026,
'speed_upload' => 0,
'header_size' => 307,
'request_size' => 103,
'ssl_verifyresult' => 0,
'ssl_engines' =>
array (
0 => 'dynamic',
1 => 'cswift',
2 => 'chil',
3 => 'atalla',
4 => 'nuron',
5 => 'ubsec',
6 => 'aep',
7 => 'sureware',
8 => '4758cca',
),
'content_length_download' => 218,
'content_length_upload' => 0,
'content_type' => 'text/html',
'httpauth_avail' => 0,
'proxyauth_avail' => 0,
'num_connects' => 1,
'os_errno' => 0,
'error' => '',
)
PHP Documentation Group HTTP_GET(3)