Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-16-2012, 11:34 AM   #1
Registered: Apr 2011
Distribution: Ubuntu
Posts: 42

Rep: Reputation: Disabled
Linux command to print code structure

I learned this command, but I forgot what it was now... I googled it, but cannot find anything.

Let's say that I have a following code.
/* rows.c */
#include <stdio.h>
#define ROWS  6
#define CHARS 10

int main(void) {
    int row;
    char ch;

    for (row = 0; row < ROWS; row++) {
        for (ch = 'A'; ch < ('A' + CHARS); ch++) {
            printf("%c", ch);
    return 0;
From a terminal, the command I forgot will print something like following,
$ command rows.c
main {
    for {
        for {
I do not remember exact format of output. I think it prints any for-loop, while-loop, etc. It should show some kind of structure or hierarchy of the file.

Does anyone know this command?
Old 10-16-2012, 02:38 PM   #2
LQ Newbie
Registered: Jul 2012
Location: Brazil
Distribution: Ubuntu, Freebsd, CentOS
Posts: 17

Rep: Reputation: Disabled
You must compile your source code first then run the program generated.

gcc -o /path/to/myProgram  /path/to/rows.c


Last edited by valdinei; 10-16-2012 at 02:41 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The Basic Structure of a Linux Command LXer Syndicated Linux News 0 11-09-2010 07:10 PM
Convert directory structure from long file names in Linux to DOS 8.3 structure? manorina Linux - Software 5 09-12-2009 10:18 AM
UFS code ufs_fragtable_8fpb data structure ?????? fsProgrammer Linux - Newbie 0 02-24-2008 03:55 AM
Moving packages - linux command structure bookie Linux - Newbie 7 07-09-2007 04:47 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:52 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration