10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I extracted a file using an awk command like this
awk '{print substr($0,78,5)"," substr($0,59,6) "," substr($0,81,3) "," substr($0,11,7)}' file1 >> OUTPUT
cat OUTPUT
00001,100000,005,0000080
00001,100000,008,0000220
00001,100000,001,0001000
00010,100000,001,0000400
I want... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies
2. Shell Programming and Scripting
HI Guys,
I have Below Input :-
RepigA_hteis522 ReptCfiEtrBsCll_aofe
MSL04_MSL2_A25_1A 0 9
MSL04_MSL2_A25_1B 0 9
MSL04_MSL2_A25_1C 0 9
RepigA ReptCfiEtrBsCll
hteis522 aofe
MSL04_MSL2_A25_1A 0 9
MSL04_MSL2_A25_1B 0 9
MSL04_MSL2_A25_1C 0 9
Split Data in two first row... (2 Replies)
Discussion started by: pareshkp
2 Replies
3. Shell Programming and Scripting
the following is used to add numbers:
echo 7 47 47 44 4 3 3 3 3 3 | awk '{ for(i=1; i<=NF;i++) j+=$i; print j; j=0 }'
how do i multiply OR subtract a row of numbers using the above tactic? (8 Replies)
Discussion started by: SkySmart
8 Replies
4. Shell Programming and Scripting
Hi experts,
I want to multiply certain columns to variable,
data :
1 2 3 4 5 6 7 8 9
result with var = 2 for column 3,6,9 ... (every columns which can be divided to 3):
1 2 6 4 5 12 7 8 18
I have tried :
awk 'BEGIN{FS=OFS=" "}{print $1,$2,$3*a,$4,$5,$6*a,$7,$8,$9*2 }' a=2 file.txt
but how... (6 Replies)
Discussion started by: guns
6 Replies
5. Shell Programming and Scripting
HI help
i have
cc 9+37.50 328611.50 688498.25 42.38
cc 66+62.50 328636.50 688498.42 42.58
i want to make o/p
cc 9+3750 328611.50 688498.25 42.38
cc 66+6250 328636.50 688498.42 42.58
plz help (2 Replies)
Discussion started by: Indra2011
2 Replies
6. Shell Programming and Scripting
Hi,
I need to multiply 3rd column (comma seperated) of entire file by a value say 2.2.
Suppose the file is:
C,Gas $ YTD(TRI),15512.36,01/01/2010
New file should be (3rd column value multiplied by 2.2):
C,Gas $ YTD(TRI),34127.192,01/01/2010 (5 Replies)
Discussion started by: yale_work
5 Replies
7. Shell Programming and Scripting
All I want to do is find 5!.
read num
num={1..5}
while
do
f=
done
echo f
Error Msg. line 5: ${1..5} bad substitution
line 6: integer expression expected
Line 5 is the num=...
Line 6 is the "while" statement
I am new at this, and I am really, really trying.
Please... (14 Replies)
Discussion started by: Ccccc
14 Replies
8. Shell Programming and Scripting
I have no idea about programming, just know some simple html :confused:and I need to get to somebody that can help me with creating the application (?) that will multiply 2 varibales and given price (height x lenght) x $$$.
PLEASE HELP!:confused:
edit by bakunin: Anita, as much as we... (2 Replies)
Discussion started by: Anita Flejter
2 Replies
9. Shell Programming and Scripting
I need to multiply the value of a variable and then store it in another variable. I have EXPHOURINSEC=$(($EXPDATEHOUR * 3600)) but i get an error saying the * is unexpected.
Im using ksh (4 Replies)
Discussion started by: fwabbly
4 Replies
10. Shell Programming and Scripting
Hi,
I am a newbie to gawk and I really don't know how to do this... I have a file with several columns of numbers and I want to make operations with some of the values...
cat file.dat | gawk -v NAME=2 '/AS/ {TIME=$4} $1==NAME {print TIME,($3*1)}'
The result of multiplying the field 3 by... (2 Replies)
Discussion started by: pau
2 Replies