Search Results

Search: Posts Made By: akshaykr2
1,677
Posted By akshaykr2
Thanks!!
Thanks!!
1,677
Posted By akshaykr2
its a tab delimited file. I am trying to use gawk...
its a tab delimited file. I am trying to use gawk to replace the "-"
1,677
Posted By akshaykr2
Replace field when only "-" occurs on a random basis
I have a file in which "-"(by itself and nothing else) occurs in different fields in each record(sometimes in the 3 field, sometime in the 20th field, some time in the 100th field....etc). Also there...
2,149
Posted By akshaykr2
Thanks, that works!
Thanks, that works!
2,149
Posted By akshaykr2
This does not work while using awk. How do I do...
This does not work while using awk. How do I do this in awk?

Thanks
2,149
Posted By akshaykr2
How to select or make reference to, part of a field
For a field format such as AAL1001_MD82, how do I select(and use in if statement) only the last four elements( in this case MD82) or the first three elements (in this case AAL)?

For instance, how...
8,223
Posted By akshaykr2
Clear! Thanks a lot
Clear! Thanks a lot
8,223
Posted By akshaykr2
Thanks a lot! I really appreciate your help ...
Thanks a lot! I really appreciate your help

---------- Post updated at 05:47 PM ---------- Previous update was at 05:23 PM ----------

What values are assigned to array f[$1]? I understand its...
8,223
Posted By akshaykr2
I am beginner, and would like to know the...
I am beginner, and would like to know the following

* Does the command read the files one by one, or does it read it simultaneously?

* How does it know which command is for which file?

* How...
8,223
Posted By akshaykr2
I realized that you had not used curly brackets....
I realized that you had not used curly brackets. The command runs, but the file generated(opwonoise) does not have anything in it.

Can you please explain the command?

Thanks
8,223
Posted By akshaykr2
$ gawk'{FNR==NR {arr[FNR]=$1; next}...
$ gawk'{FNR==NR {arr[FNR]=$1; next} $1==arr[FNR]}' opnoise opwflightno > opwono
ise
bash: gawk{FNR==NR {arr[FNR]=$1; next} $1==arr[FNR]}: command not found

This is what I got
8,223
Posted By akshaykr2
I did! its not working
I did! its not working
8,223
Posted By akshaykr2
I am getting command not found. All I did was...
I am getting command not found. All I did was replace nawk with gawk. I do not have nawk.
3,412
Posted By akshaykr2
awk getting stuck after BEGIN
I am beginner in awk

awk 'BEGIN{for(i=1;(getline<"opnoise")>0;i++) arr[i]=$1}{print arr[20]}'

In the above script, opnoise is a file, I am reading it into an array and then printing the value...
8,223
Posted By akshaykr2
Actually this what I am trying to do. I need to...
Actually this what I am trying to do. I need to use the values in the array to remove certain records in file opwflightno and make a new file opwonoise. But awk is not executing beyond BEGIN. I had...
8,223
Posted By akshaykr2
awk: reading into an array and then print the value corresponding to index
I am beginner in awk

awk 'BEGIN{for(i=1;(getline<"opnoise")>0;i++) arr[i]=$1}{print arr[20]}'

In the above script, opnoise is a file, I am reading it into an array and then printing the value...
Showing results 1 to 16 of 16

 
All times are GMT -4. The time now is 09:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy