scripting

What would be the right way to declare an array within a script that will be called by cron?

╄→гoц情女王★ 提交于 2019-12-25 12:05:51
问题 I have written a KornShell (ksh) script that sets an array the following way: set -A fruits Apple Orange Banana Strawberry but when I am trying to run it from within cron, it raises the following error: Your "cron" job on myhost /myScript.sh produced the following output: myScript.sh: -A: bad option(s) I have tried many crontab syntax variants, such as: Attempt 1: 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /path/to/script/myScript.sh Attempt 2: 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /path

Faster way to partition a Face with Sketch in ABAQUS with scripting

倾然丶 夕夏残阳落幕 提交于 2019-12-25 08:49:32
问题 My aim is to obtain a transition mapped quad meshing on a long rectangular region which is a parametrised model. The final mesh can be seen as follows: The only way I could realise this final output mesh was to partition the face with sketch and then, using adequate mesh controls and seeding on the respective edges. For this reason, I started with generating a block on the left hand side of the geometry like this: Thereafter, a "for" loop was used in the Python script running from the left

Extracting data from text file after 2 conditions have been met

北慕城南 提交于 2019-12-25 07:51:53
问题 I'm working on a bash script at the moment which extracts data from a text file called carslist.txt , which each car (and its corresponding characteristics) being on separate lines. I've been able to extract and save data from the text file after it's met a single condition (below for example) but I can't figure out how to do it for two conditions. Single condition example: grep 'Vauxhall' $CARFILE > output/Vauxhall_Cars.txt output: Vauxhall:Vectra:1999:White:2 Vauxhall:Corsa:1999:White:5

PHP preg_match meaning and issue

天涯浪子 提交于 2019-12-25 07:46:15
问题 Currently I have this code: <?php if (isset($_GET['id'])) { $itemid = $_GET['id']; $search = "$itemid"; $query = ucwords($search); $string = file_get_contents('http://clubpenguincheatsnow.com/tools/newitemdatabase/items.php'); if($itemid=="") { echo "Please fill out the form."; } else { $string = explode('<br>',$string); foreach($string as $row) { preg_match('/^(\D+)\s=\s(\d+)\s=\s(\D+)\s=\s(\d+)/', trim($row), $matches); if(strstr($matches[1], $query)) { echo "<a href='http:/

PHP preg_match meaning and issue

a 夏天 提交于 2019-12-25 07:42:28
问题 Currently I have this code: <?php if (isset($_GET['id'])) { $itemid = $_GET['id']; $search = "$itemid"; $query = ucwords($search); $string = file_get_contents('http://clubpenguincheatsnow.com/tools/newitemdatabase/items.php'); if($itemid=="") { echo "Please fill out the form."; } else { $string = explode('<br>',$string); foreach($string as $row) { preg_match('/^(\D+)\s=\s(\d+)\s=\s(\D+)\s=\s(\d+)/', trim($row), $matches); if(strstr($matches[1], $query)) { echo "<a href='http:/

Storing the response of login using curl?

橙三吉。 提交于 2019-12-25 06:49:39
问题 I have logged in to a website using url,username and password using curl.The main question is that i want to get the response back and store it in php script that the site has been logged in or not ? Storing response i.e. logged in or login failed in the php script is the main question ? I have given the script below can u tell me what to add ? Thanks in advance <?php $cookiefile = tempnam("/tmp", "cookies"); $login_url='**********'; $login_post_url='*********'; $username = "*****"; $password

Automated rotating and placing image and text on a page in InDesign

一世执手 提交于 2019-12-25 06:47:07
问题 I have been tasked with taking a set of product images and text and placing them in a booklet (with facing pages) and putting the product description next to the image. Most images are landscape orientation whilst the book is portrait, and so they need to be rotated. For the images that have to be rotated, I'm placing the text in a textframe, fitting the frame to the content, then calculating the max image size, to then resize and then placing the image and rotating 90 / 270 degrees depending

How to test if a feature is installed in a karaf console script?

笑着哭i 提交于 2019-12-25 06:38:34
问题 I need to write a karaf console script that uninstalls a feature, if it is present on karaf 3.0.4. So far I have not found any direct references mentionend in the documentation (https://karaf.apache.org/manual/latest-3.0.x/developers-guide/scripting.html). Using shell:env ? always returns null as the value and I'm not sure if ? is a supported environment variable name in karaf. So how can execute a karaf command if a feature is present? 回答1: It is not possible to test if a feature is

Script for .SAT (ACIS) files manipulation

大兔子大兔子 提交于 2019-12-25 06:07:29
问题 I need to make a script for ACIS files manipulation, for example: I have 1 SAT file exported from a CAD software with a 3D Model, and i want to create a script in some language (php, python, etc.. even .BAT if it works) that opens the SAT file delete all the components inside my 3D model. I just want the outside of the 3D model. There is some way to do this? becuase i look to the SAT file and it's an ammount of text lines, maybe with a RFC and some tricky tools i can do this.. Any ideia? Best

WebForms scripts only works in debug mode

六月ゝ 毕业季﹏ 提交于 2019-12-25 06:06:56
问题 I have a site with forms a validationGroup and LinkButton to handle them, which calls WebForm_PostBackOptions . the problem is WebForm_PostBackOptions works only on localhost (debug?), but when I copy it to the production on a remote server I get the following error: Uncaught ReferenceError: WebForm_DoPostBackWithOptions is not defined I have the following code: In Site.Master: <asp:PlaceHolder runat="server"> <%: Scripts.Render("~/bundles/modernizr") %> </asp:PlaceHolder> ... <ajaxToolkit