Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Question about C command in a shell script

Status
Not open for further replies.

xiongdh

Member level 4
Joined
Jul 18, 2002
Messages
76
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Location
china mainland
Activity points
682
set ow = `awk '/Author/ {print $2,$3,$4,$5}' ./tcase/$1/$1.v`

sed s/test_case/$1/g < transport_tb.v > $1\_tb.v

date >! temp1
set tm = `awk '{print $4"("$2"/"$3")"}' temp1`


I find these command in a shell script , what is the meaning?
 

Re: c shell question

#searches for line containing string "Author" (from file ./tcase/$1/$1.v where $1 is
# first argument passes to this script) on this line the 2nd, 3rd, 4th and 5th
# words get assigned to $ow

set ow = `awk '/Author/ {print $2,$3,$4,$5}' ./tcase/$1/$1.v`
# this will search for "test_case" in transport_tb.v file and replce it with $1 the result will
# be stored in $1_tb.v file
sed s/test_case/$1/g < transport_tb.v > $1\_tb.v

# store current date and time in temp1 file
date >! temp1

# this will set $tm to 16:42:33(Aug/25)
set tm = `awk '{print $4"("$2"/"$3")"}' temp1`

I will advice you to run commands one by one and see yourself whats happening.
you can get help by using man for awk and ed

Hope this helps
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top