Search Results

Search: Posts Made By: keyvan
8
10,450
Posted By keyvan
I have a question or two to better understand...
I have a question or two to better understand this script:

1- $str=string???
2- how dose the script compare and reads the word line?

i hope the questions are not stupid, just trying to get a...
8
10,450
Posted By keyvan
am i correct to assume that the above script will...
am i correct to assume that the above script will produce a random word, as long as the words are set as follow:


word1
word2
word3
word4
etc..


K
8
10,450
Posted By keyvan
what can be used instead of sed, as i dont know...
what can be used instead of sed, as i dont know anything about sed and rather learn shell scripting first and then look at sed, also just so i can understand this better, the random word file, needs...
8
10,450
Posted By keyvan
Random
My problem is as follow and i hope you can help:

I currently have this function:



stored_word()
{
number=$RANDOM
let "number %= 21"
case $number in
0 ) echo "energy" ;; 1 ) echo...
4,156
Posted By keyvan
when the script is run, it keeps on running on...
when the script is run, it keeps on running on the same word over and over again, instead of taking a new one and placing it in $word. is there any way of cleaning a Variable?

Keyvan
4,156
Posted By keyvan
Bash Scripting
Hello there peeps:

There is a little piece of bash shell scripting problem i have, which i was hoping you could help me with.



#!/bin/bash

stored_word()
{
case $(( $$ % 8 )) in
...
2,770
Posted By keyvan
oh how silly of me... that would have been...
oh how silly of me... that would have been usefull... sorry guys i should have mentioned it its bin/bash.. the error is still the same.

hang: line 38: 14663 % 0 : division by 0 (error token is "...
2,770
Posted By keyvan
hang: line 38: 14663 % 0 : division by 0 (error...
hang: line 38: 14663 % 0 : division by 0 (error token is " ")

now its getting silly :)

K
2,770
Posted By keyvan
hang: line 36: declare: `--': not a valid...
hang: line 36: declare: `--': not a valid identifier
hang: line 38: 27142 % 0 : division by 0 (error token is " ")

now it gives this error.. i think it might be the way i have set up the word...
2,770
Posted By keyvan
gives this error hang: line 36: set: -A:...
gives this error

hang: line 36: set: -A: invalid option
set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...]


K
2,770
Posted By keyvan
jim, np at all... i am trying to learn shell...
jim,

np at all... i am trying to learn shell scripting and the only way for me to learn is to ask questions, and since i have no teachers or instructors to fall back on, then i can only use these...
2,770
Posted By keyvan
Jean i cant use sed in any of my scripting.. dont...
Jean i cant use sed in any of my scripting.. dont ask me why but thats the harsh truth. how can the above script be changed to remove the sed section?

thx mate

K
2,770
Posted By keyvan
randomization
I have two files:


First file with 10 words, as follow:

randomword1, randomword2, randomword3, randomword4, etc...

Second File shell script.

word=$(cat hangman_words | cut -d" " -f1)...
2,995
Posted By keyvan
Bash shell Scripting help
wwww wwwwwwww wwwwwwwwwwwww
Showing results 1 to 14 of 14

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