Question: How to generate edge sets of all connected graphs on n vertcies?

Is there an easy command to generate the edge sets of of all connected graphs for a given number of vertices? Ideally, I'd like to output to be of the form (e.g.)

G={{1,2},{2,3},{1,3},{1,4}};

text text text text;

text1 text1;

so that I can easily copy it into another program to be read. Or, is there a way that I can produce an output like the following (e.g. for n=3)

G={{1,2},{2,3}};

text text text text;

text1 text1;

G={{1,2},{2,3},{1,3}};

text text text text;

text1 text1;

and have it export to a text file?

Please Wait...