Forum: Shell Scripting Jun 6th, 2007 |
| Replies: 10 Views: 3,946 solved by myself, it was a end-line character problem..:) |
Forum: Shell Scripting Jun 6th, 2007 |
| Replies: 10 Views: 3,946 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 how to assign the value of the function in a shell script?
thanks! |
Forum: Shell Scripting Jun 4th, 2007 |
| Replies: 10 Views: 3,946 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 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 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 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... |