title: How to keyboard type a variable using xdotool?
body: <p>I am coding a little script to save some data from Internet every single day.
  So I am using xdotool to simulate all my navigation until the point I have the save window of firefox in front of me, I mean, in front of my script. OK, all right until here... But, when I try to use the day of the week(or any data in the <code>i</code> variable) as a part of the filename to be saved........... hmmm --> "nothing happens". =(</p>
  
  <p>Well, I guess I have some simple problem here, I have tryed very ways to use the content of the variable I got with the date function, or simple pipe directly, but xdotool refuses to type this info into the filename box in save file window, which is obvius selected and text highlighted.</p>
  
  <p>Some light in the path, Masters! I am a terrible noob! Sorry! =)  So this is the code I tryed,(problem in last line):</p>
  
  <pre><code>#!/bin/bash
  
  i=|date +%A
  echo $i
  
  WID=`xdotool search --name "Mozilla Firefox" | head -1`
  xdotool windowactivate $WID
  xdotool key ctrl+l
  xdotool type "http://whatever.com.au"
  xdotool key Return 
  sleep 2
  xdotool key ctrl+s
  sleep 2
  
  xdotool type WeekDayIs$i
  </code></pre>
  
  <p>I guess I am missing something really obvius, maybe some typecasting....</p>
  
  <p>I'm really a begginner, so don't blame me so much. I tryed with <code>"$i"</code> and <code>{"$i"}</code> and <code>'$'</code> too.. nothing works... =/ Thanks everybody.</p>
  
  <p>ps: AND, if some nice dude want to point me out a straight way to save directly some web content to a file, maybe I walk on my knees to him.. ;-)
  EDIT : I got the answer to this question too <a href="https://stackoverflow.com/questions/8994717/can-i-save-a-file-which-will-be-generated-from-php-code-on-server-side-using-onl">here</a></p>
  
  <p>EDIT POS-SOLUTION:</p>
  
  <p>yes shellter, this code prints out Tuesday and YesTuesday and not 3 more times Tuesday. hehe, one day after another. Thanks for your attention.</p>
  
  <pre><code>#!/bin/bash
  i=|date +%A
  echo $i
  echo $i
  echo $i
  
  i=$(date +%A)
  
  echo Yes$i
  </code></pre>