help can't understand the code


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting help can't understand the code
# 1  
Old 07-26-2011
help can't understand the code

Hi All,

Good day, i'm just wondering what is the meaning of this code?

Code:
COUNT_EXTRACTED_FILE=`${ECHO_CMD} "${SE_IN_PATH}${SE_IN_FILE}" | ${AWK_CMD} -F"__" '{print $2}'`

Thanks,
-niks(newbie)
# 2  
Old 07-26-2011
you still newbie Smilie ?

you need to check your code by executing some examples.

Code:
echo "abcd__efgh" | awk -F"__" '{print $2}'

here Field delimeter is __
and we are printing the second field ( efgh )
This User Gave Thanks to itkamaraj For This Post:
# 3  
Old 07-26-2011
hihihi.... yup i'm still a newbie in shell.. tsktsk.. thanks master itkamaraj. ^_^
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help me to understand this code

Hi guys can you please help me to understand this code . tmpArray=(${line//=/ }) Please next time open a new thread in the appropriate forum and use code tags (6 Replies)
Discussion started by: sandhya.gilla
6 Replies

2. UNIX for Dummies Questions & Answers

Trying to understand a complex bit of code

Hi, To re-introduce myself, I'm a router guy trying to learn some scripting from the examples in my work place... In a ksh script, one of the script guys wrote the following and I am trying to understand it. I'm hoping someone can explain it to me. The script flow enters a case structure.... (5 Replies)
Discussion started by: Marc G
5 Replies

3. Shell Programming and Scripting

can't understand!

Hi All, can you please help me to figured out what's the meaning of this. ${SERVER_DATABASE} -b << EOF 2>>/dev/null THanks, (3 Replies)
Discussion started by: nikki1200
3 Replies

4. Programming

Need help with this c++ source code! DOnt understand what some stuff mean.

Okay so I am just starting programming c++. I just started started to red "C++ for Dummies yesterday and theres a lot of things I do not understand from this book and this source code especially. I will first post the full source code and then post questions about certain thing, usually what they... (2 Replies)
Discussion started by: orszhak
2 Replies

5. Shell Programming and Scripting

Need help to understand Awk code.

Hi Guys, Can someone please explain this code to me. I could figure out it's adding and comparing two fields but I am not sure which ones. sort -t"|" -k3.1 /tmp/mpcashqc.xtr| awk -F"|" '{CHECKAMT+=$3;BATCHTOT=$4;\ items++}END{for(i in CHECKAMT) if (CHECKAMT!=BATCHTOT)... (6 Replies)
Discussion started by: nua7
6 Replies

6. UNIX for Dummies Questions & Answers

unable to understand a awk code

i am not able to understand the following code for awk: $awk -F"|" '{ kount++} >END { for (desig in kount) > print desig,kount }' emp.list the input file i.e. emp.list is :: 3432| p.k.agrwal |g.m |sales 4566|g.l.sharma |director|production 3433|r shah | g.m | production... (1 Reply)
Discussion started by: streetfi8er
1 Replies

7. UNIX for Advanced & Expert Users

Code Understand ?

Hey, Could you explain me what this code is doing ? For example: $i has value 9 $1 is the name of the file say FILEBkUp while do if $1.`/bin/expr $i - 1` ] then mv -f $1.`/bin/expr $i - 1` $1.$i fi i=`/bin/expr $i - 1` done Thanks... (2 Replies)
Discussion started by: varungupta
2 Replies

8. Shell Programming and Scripting

perl - understand process status and continue the code execution

Hello, I need advice on how to check if started processes are finished in perl, here's explanation : OS is RHEL 4, perl -v = "This is perl, v5.8.0 built for i386-linux-thread-multi" The logic of the script : #!/usr/bin/perl use warnings; $param1 = $ARGV; $param2 = $ARGV; $param3 =... (2 Replies)
Discussion started by: sysgate
2 Replies
Login or Register to Ask a Question