I'm trying to delve into the world of multithreading and I'm having some difficulty... Typical producer-consumer results in an IllegalMonitorException.
public class Producer implements Runnable...
Type: Posts; User: crownedzero; Keyword(s):
I'm trying to delve into the world of multithreading and I'm having some difficulty... Typical producer-consumer results in an IllegalMonitorException.
public class Producer implements Runnable...
Java, Java, Java! I like c/c++; however, it seems the job market is Java crazy particularly at entry level. Also a huge demand for web developers. HTML,CSS,JScript, and PHP are a good place to start....
I toying around with chef and box grinder and I've encountered a problem I'm trying to work around. I have an iscsi I'm trying to auto mount. Doing so thru the fstab doesn't do the trick. Any ideas...
Assuming a user doesn't tweak the file itself there won't be any blank lines. The script takes information and stores it in a delimited file, and won't accept blank input so hopefully I'm covered =)...
i just threw the wc in there, i ended up with
while read line; do
#echo -e "$(awk -F':' '{print NR, $1, $2, $3, $4}')"
let count++
echo $count $line
done < <(awk -F':' '{print...
I'm building a script that accesses a file. I've currently put 8 records into the test data but when I try to list with line numbers I get 7 rather than 8...
while read line; do
echo -e...
Ok so here goes, I'm making a menu driven program for a project and I'm looking for feedback. I still need to tighten up the error handling (if exists etc.) but I welcome any feedback. Please let me...
main_menu_function()
{
while true
do
echo "********************************************************************************"
echo "* Main Menu ...
Let me see if I'm understanding and try to expand on what you've said...
so in the case of 4) Exit have it set a parameter to whatever and check in the conditional statement to exit the script?
echo "********************************************************************************"
echo "* Main Menu *"
echo "* ...
You end up with 5 + 4 + 3+ = sum using this method I managed a work around its ugly but I learned something lol
I'm trying to make a bash menu displaying options but it contains sub menus as well. Is there anyway to add an identifier that will display with the menu?
Right now it displays
Option 1
Option...
Kind silly but I'm getting an infinite loop passing command line args to a while loop and attempting to sum them with the output shown as
var1 + var2 + var3 = sum
while -z $1 do
echo -n...
#!/bin/bash
#script to inform users of their expired account
#declare variables as integers
declare -i user_epoch_time;
declare -i todays_epoch;
#option to clear logs
echo -n "Would you...
Sounding like awk is the way to go, I was thinking I could just use read line, and then refer to the different variables much like in the command line arg syntax, $1, $2 etc, I'll get some code...
I have a number of records in a file, each contains 25 fields. I need 2 of these fields assigned to variables. Everything I've come up with thus far isn't working...
my while read line; do just...
Not sure I followed.
So for file in a directory set a variable equal to the whatever the file command returns, then compare this variable to "shell script" or something similar, if yes display,...
find -executable only looks for those marked +x
file on the other hand will list if it is a shell script, guess the issue I'm having is the logic.
If part of the file returns "shell script",...
#!/bin/bash
#scriptfinder.sh
#check for arguments
if [ ! -z $2 ]; then
echo "USAGE: Too many arguments"
#if argument is empty
elif [ -z $1 ]; then
As silly as this sounds I'm trying to put together a lesson plans for young kids i'm not sure they'll understand for loops and iterating thru a sequence >.<
echo -e "*****************************************************"
echo -e "** **"
echo -e "** Now let's create some files in **"
echo...
That'll work but I'm trying to keep this as simple as possible.
I need the shell to interpret the variable literally, if for example:
$var = ~/dir1/file1
I should be able to touch $var and get...
read files_to_create
touch $files_to_create
I tried using grouping in the script but ended up with braces etc in the file names.
I'm trying to get a single var from a user and then create files based on that, very rudimentary but I can't seem to get it right.
i.e.
variable ~/make/this.txt ~/file/over/here.txt
should...
Damn these old eyes ... thanks!