Sigh... Need help with moving object a distance over time

I want to move a cube a certain distance over a certain time to the right, pause, and move to the left, pause and repeat.

So far all I have is this, it kind of works but not good enough, and its a dumb aproach no doubt. It moves the directions its suppose to but the distance and speed are dependent on each other when i change them in the inspector and i just want to set a distance and a speed that it passes that distance. Also the cube kind of jitters before it starts moving I don’t like that either. >.<

#pragma strict

var speed : float = 5;
var distanceTime : float = 1;
var pause : float = 1; 

function Update () 
{

	moveCrush();

}

function moveCrush()
{
	yield WaitForSeconds(pause);
	transform.Translate(Vector3(speed,0,0) * Time.deltaTime);
	yield WaitForSeconds(distanceTime);
	transform.Translate(Vector3(-speed,0,0) * Time.deltaTime);
	yield WaitForSeconds(pause);
	transform.Translate(Vector3(-speed,0,0) * Time.deltaTime);
	yield WaitForSeconds(distanceTime);
	transform.Translate(Vector3(speed,0,0) * Time.deltaTime);
	Update();

}

I’ve searched all over the place and google and didn’t find any answers so I’d appreciate help on this. :S

Did you see the documentation for Lerp? It has an example close to what I think you want.