9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Help understand awk command
This command converts the column values to rows.
Command:
awk -s1=" " '{S=S?S OFS s1 $0 s1:s1 $0 s1} END{print S}' OFS=, Input_file
Example:
1
2
3
is converted to:
1, 2, 3
Can anyone please help me understand this command?
Please use code tags when... (1 Reply)
Discussion started by: mohan44
1 Replies
2. UNIX for Dummies Questions & Answers
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
3. UNIX for Dummies Questions & Answers
Hi
below is the samll awk script which i am not able to understand properly.
here a bit confusion in 2nd line for me
1. why *\ is not used before . in second line as it was used in first line *\$*\. */
2. why always \ is used in every first line
3. is there any specific meaning... (9 Replies)
Discussion started by: scriptor
9 Replies
4. UNIX for Dummies Questions & Answers
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
5. UNIX for Dummies Questions & Answers
Hi All,
I have googled and spent few hours to understand about AWK usage... But still not very much clear....
Upto my understanding 'AWK' deals with files... It reads the file takes it as a input process it and gives output or writes the output to an another file...
>> Please correct me... (23 Replies)
Discussion started by: ambarginni
23 Replies
6. Shell Programming and Scripting
Hi All,
Good day, i'm just wondering what is the meaning of this code?
COUNT_EXTRACTED_FILE=`${ECHO_CMD} "${SE_IN_PATH}${SE_IN_FILE}" | ${AWK_CMD} -F"__" '{print $2}'`
Thanks,
-niks(newbie) (2 Replies)
Discussion started by: nikki1200
2 Replies
7. Shell Programming and Scripting
I learn using RS in awk to extract portion of file in this forum which is wonderful solution to the problem. However, I don't understand how exactly it operates.
I don't quite understand the mechanism behind how searching for /DATA2/ can result in extracting the whole section under "DATA2"
... (3 Replies)
Discussion started by: joe228
3 Replies
8. UNIX for Dummies Questions & Answers
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
9. UNIX for Advanced & Expert Users
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