Search Results

Showing results 1 to 7 of 7
Search took 0.01 seconds.
Search: Posts Made By: alexxxprog
Forum: Shell Scripting Jun 6th, 2007
Replies: 10
Views: 3,946
Posted By alexxxprog
solved by myself, it was a end-line character problem..:)
Forum: Shell Scripting Jun 6th, 2007
Replies: 10
Views: 3,946
Posted By alexxxprog
yes typing it works but if I execute the shell script "bash myscript.bash" give me that error!
What to do?
Forum: Shell Scripting Jun 4th, 2007
Replies: 10
Views: 3,946
Posted By alexxxprog
how to assign the value of the function in a shell script?

thanks!
Forum: Shell Scripting Jun 4th, 2007
Replies: 10
Views: 3,946
Posted By alexxxprog
tryrandom.bash:

#!/bin/bash
start=300
end=600
echo $(($RANDOM % ( $end - $start + 1 ) + $start))

tryrandom.bash: line 2: 19345 % -1 + : syntax error: operand expected (error token is " ")
Forum: Shell Scripting Jun 2nd, 2007
Replies: 10
Views: 3,946
Posted By alexxxprog
thank you very much ghostdog74!

My code then is this:

#!/bin/sh
mkdir data
cd $data
number=$2
while $number > 0; do
mkdir collection$number
Forum: Shell Scripting Jun 1st, 2007
Replies: 10
Views: 3,946
Posted By alexxxprog
yes I tried this:

#!/bin/sh
mkdir $1
number=$2
while $number > 0; do
mkdir collectionnumber$number
numbermaxfile4folder=here I have to assign a RANDOM BETWEEN 300 AND 600 (how ???)
...
Forum: Shell Scripting Jun 1st, 2007
Replies: 10
Views: 3,946
Posted By alexxxprog
Thank you very much for who can solve this bash script:
"Create a bash procedure createdata that creates collections (directories) that that will have to contain a random number, comprised between...
Showing results 1 to 7 of 7

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC