Hey folks!
I am new to shell-scripting, but I have a problem that I would like to solve using a script. I create very large html forms, used for randomized trials. In these forms, each question is supplied with a variable that looks something like this: PROJECT_formNN
Where NN is the question number. Say I need to put in a question in the middle, the whole line of questions after this one are then put out of order.
Solution?
/Roevhat
I am not clearly but i try to write something.
For exa you have some questions in a file that named 'questions'
#!/bin/bash
q=questions
nn=$(wc -l <$q)
NN=1
while read -r quest
do
echo "$quest">PROJECT_form$NN
((NN++))
done<$q
# cat questions
What is your name?
Where are you from?
How about?
Are you joking me?
What is your favourite singer?
# for i in {1..5}
> do
> cat PROJECT_form$i
> done
What is your name?
Where are you from?
How about?
Are you joking me?
What is your favourite singer?