Search Results

Search: Posts Made By: devrymike
7,259
Posted By devrymike
The first thing I notice is that your variable...
The first thing I notice is that your variable isn't being called correctly.


$hexval = sprintf("%x", $readline);


Change to
$hexval = sprintf("%x", $readLine);


I hate perl, but it...
1,054
Posted By devrymike
So just for clarification, you want to call a...
So just for clarification, you want to call a file you're creating with certain key words instead of calling your whole egrep?

So instead of


egrep -vi "banner content|message...
844
Posted By devrymike
I would imagine you can just throw a prompt in...
I would imagine you can just throw a prompt in there...


echo "What would you like to search for?"
read inputValue

grep -i "$inputValue" $CONSOLE_FILE > $CONSOLE_OUTPUT


I don't see...
2,192
Posted By devrymike
You're creating an infinite loop with this. Once...
You're creating an infinite loop with this. Once it's wrong, it never exits because you never get a new value.


while (( $antwoordleerling != $antwoordjuiste ))
do
echo "Fout! Probeer het...
2,569
Posted By devrymike
Is this just for a single file? If so, probably...
Is this just for a single file? If so, probably what you're going to want to do is count either characters or lines and start deleting blank lines after that.

If it's for multiple files, can you...
23,719
Posted By devrymike
So strange. You know when throwing a variable...
So strange. You know when throwing a variable into another variable and flipping a meaning fixes your script, it's a very strange language :).

Glad you got it working though.
23,719
Posted By devrymike
Can you post the results from this? I was...
Can you post the results from this? I was actually going to suggest hard coding the file to see if it's that command line variable.
23,719
Posted By devrymike
What is your foreach pulling there? You have to...
What is your foreach pulling there? You have to have the full file name after the -e, so if you need to append extentions or whatnot, make sure you're doing it. I put an example below.


foreach...
2,192
Posted By devrymike
This just compares whatever their input is with...
This just compares whatever their input is with the actual answer.

I've checked that and both values come out correct. If you add the bolded statements to it, you'll see that the values come out...
2,192
Posted By devrymike
The thing is, with what you're trying to do,...
The thing is, with what you're trying to do, you'll have to check each input (if you want it to repeat until they get it right at least). Which, unless there's some math library I don't know about...
Showing results 1 to 10 of 10

 
All times are GMT -4. The time now is 04:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy