- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Blurb.
- Interests
- Sleep.
- PC Specs
- 16GB RAM / 3 Ghz CPU / Red Hat Enterprise Linux Client release 5.4
13 Posted Topics
Hello, I have a script that "validates" a ZIP file that look like this > AAA_20120801.zip => > x~back end~20120801.TXT > y~time in~20120801.TXT > z~heat_chamber~20120801.TXT > AAA_20120801.ctl My task is to compare its contents (i.e the list of files contained inside) with the control file that is provided inside the … | |
I built a very simple app using a PHP form with a bit of Javascript. In my form, I have a text input which I used to run a database search. In case I have multiple values, I have a bit of code that puts a comma in between each. … | |
[B]**Disclaimer: It's been a while since I last wrote any code. The quality of my code is likely to be sub-par. You've been warned.**[/B] I have a basic form that's meant to search flat files on our server. The "search engine" I created as two select lists: one for the … | |
Why does this work [CODE] for myfile in `find . -name "R*VER" -mtime +1` do SHELLVAR=`grep ^err $myfile || echo "No error"` ECHO $SHELLVAR done[/CODE] and outputs [CODE] No error err ->BIST Login Fail 3922 err No error err ->IR Remote Key 1 3310 err [/CODE] But this does not … | |
After running the command [CODE] find . -name "R*VER" -mtime +1 -exec sh -c 'grep -H ^err "{}" || echo "{}:No error"' \;[/CODE] my files look like this [CODE] RRR1~COS~COSMETICS~40048~jgmdtv113~1~P~R22-200~029053662549~20110607~102151.VER No error RRR1~COS~COSMETICS~ETT03~jgm14652.~3~F~R16-500~000907009757~20110607~085109.VER err 3922 [/CODE] Using the tilde (~) symbol as delimiter in the file name, can I extract … | |
Re: How about [icode]echo "`date '+%m/%d/%y %T:'` START" echo "do something here" echo "`date '+%m/%d/%y %T:'` END"[/icode] ?? This will output like this [icode] 03/17/11 20:43:54: START do something here 03/17/11 20:43:55: END [/icode] HTH. | |
Greetings. I am using SED to cleanup files that are laid out like so: [icode] ReceiverID=028936004663 SerialNumber=WD-WCAV95708405 Currenttemp=44C PowerOnHours=3663h ReceiverID=028923894902 SerialNumber=WD-WCAV9A766701 Currenttemp=49C PowerOnHours=2215h [/icode] My boss wants files like this one to be tab ("\t") delimited like so [icode] ReceiverID=...(tab)SerialNumber=...(tab)Currenttemp=...(tab)PowerOnHours=...(newline) ReceiverID=...(tab)SerialNumber=...(tab)Currenttemp=...(tab)PowerOnHours=...(newline)... [/icode] 1) first, I added a newline to mark … | |
Greetings! This n00b has a "search engine" dedicated to extracting relevant information from log files. It works by parsing preset fields in the log filename. I'd like to have some notification when the search returns no rows as I am planning to add more search options. Here's my code: [CODE] … | |
Greetings! I have an app that my users rely to update customer data in our local database. I want to add a "control" whereby a check for customer number is done to make sure it exists. I started with this simple script [code] <?php //variable declaration $customer_id = '257'; // … | |
Greetings! I have a form that's meant to be a rudimentary search engine. The forms calls the piece of code below and outputs successfully the results in a new tab. [CODE]<?php //Includes the db config file $dbconf = include '.../config/dbConfig.php'; //checks if fields are set. if(isset($_POST['submit'])) { if( !empty($_POST['search_string']) ) … | |
Greetings! I created this form that works like a charm, captures data in my db and sends email. Suppose user Joe hits the RESET button before he clicks SUBMIT, all fields are reset. If Joe hits the RESET button AFTER he clicked SUBMIT (e.g. to make a new submission)...nothing gets … | |
Hello! I am a newbie who's trying to code in my app a way to send email with file attachments. Here's the code I put together (thanks to Google!). [code=php]<?php $fileatt = "/somedir"; $fileatt_type = "application/zip"; $fileatt_name = "logos.zip"; $email_from = "joe@work_email.com"; $email_subject = "attachment test-subject"; $email_txt = "attachment test-body"; … | |
Re: Not time to wade your stuff either but any DBA worth his salt will tell you that "SELECT * from ..." will always be more costly (resource-wise) than " SELECT whatever_column_1,whatever_column_2,whatever_column_3... from..." My advice to you is to rewrite your queries and specify each column name. Hopefully, you have indexed … |
The End.