CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Command Help

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 10, 2011, 04:17
Default Command Help
  #1
New Member
 
Shridhar
Join Date: Oct 2011
Posts: 7
Rep Power: 14
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, 17:09
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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:
Code:
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,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 21:00.