Q:

IDA Pro converting to instruction functionality: how to automate.

I am loading various files that read into IDA as binary. Once I have the GUI in front of me I am able to go through the segments and hit "c" in order to convert to instruction/code.
However, I am primarily trying to do all my ida work via linux terminal (using the command line ./idal -B input-file). 
Is there a command line flag, or another method, to automate the generating of instructions from the binary files? Or is this something I will have to manually do every time?

A:

I would do something like this in IDAPython:
# I didn't check this code, please use carefully !This code will pass through all defined segments and will try to make code on any unexplored area
# IDAPython documentation is at https://www.hex-rays.com/products/ida/support/idapython_docs/

import idautils
import idc

for ea in idautils.Segments():
    segend = idc.GetSegmentAttr(ea, idc.SEGATTR_END)
    start = ea
    while start < segend:
        idc.MakeCode(start)
        start = idc.FindUnexplored(start+1, idc.SEARCH_DOWN)

You can run it with -S command line switch as stated in previous answer

