CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Pre-Processing

Command Help

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   December 10, 2011, 05:17
Default Command Help
New Member
Join Date: Oct 2011
Posts: 7
Rep Power: 6
shridhargrao is on a distinguished road
What does this command actually do "grep"Net mass flux" $1 |awk '{print $3}' > timeList.dat" ?
shridhargrao is offline   Reply With Quote

Old   December 12, 2011, 18:09
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,971
Blog Entries: 34
Rep Power: 92
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Shridhar,

A bit of context would be nice... anyway, that command line is split in two parts:
  1. grep searches for the lines that have "Net mass flux".
  2. The output from grep gets piped through "|" and sent to awk for processing; awk prints out the 3rd value it picks up on each of those lines, if I'm not mistaken.
To learn more about grep and awk:
man grep
man awk
Searching online for tutorials for each command will also get you more information. I also suggest tutorials about bash, so you can understand the first "$1"

Best regards,
wyldckat is offline   Reply With Quote


Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -4. The time now is 17:22.