public String getGrepCommand(ClientArgs clientArgs, String logFileName)
	{
		String keyRegExp = clientArgs.getKeyRegExp();
		String valRegExp = clientArgs.getValRegExp();
		String options = clientArgs.getOptionsString();
		String command = "";
		
		// Handle corner cases of "$" apperaring at the end of keyRegExp and "^" appearing at the end 
		// of valRegExp
		if(!(keyRegExp.isEmpty()))
		{
			if(keyRegExp.endsWith("$"))
			{
				keyRegExp = keyRegExp.substring(0, keyRegExp.length()-1);
			}
			else
				keyRegExp += ".*";
		}
		if(!(valRegExp.isEmpty()))
		{
			if(valRegExp.startsWith("^"))
			{
				valRegExp = valRegExp.substring(1);
			}
			else
				valRegExp = ".*" + valRegExp;
		}
		
		// Build the command using the keyRegExp and valRegExp
		if(!(keyRegExp.isEmpty()) && !(valRegExp.isEmpty()))
		{
			command = "grep" + options + " -E '(" + keyRegExp + " - - - " + valRegExp + ")' " + logFileName;
			return command;
		}
		if(!keyRegExp.isEmpty())
		{
			command = "grep" + options + " -E '(" + keyRegExp + " - - - )' " + logFileName;
			return command;
		}
		if(!valRegExp.isEmpty())
		{
			command = "grep" + options + " -E '( - - - " + valRegExp + ")' " + logFileName;
			return command;
		}
		return command;
	}