Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: Ernst
744
Posted By Ernst
Pattern
I have a deadline and need to come up with a script that does the following.
Goes through the file below and prints only the lines that show a count of zero (0) in column 2.
Here is the file
Type ...
2
862
Posted By Ernst
Excellent Dude2cool! It works fine, exactly what...
Excellent Dude2cool! It works fine, exactly what I am looking for.
2
862
Posted By Ernst
Loop
I have three files: f1, f2, and f3. If each file has a number of lines such that
f1

The sky is blue
The earth is round
This is paper


f2

aaaaaaaaaa
bbbbbbbbbbbbb
cccccccccc


f3
...
2,133
Posted By Ernst
It seems to work vgersh99. I appreciate you!
It seems to work vgersh99. I appreciate you!
2,133
Posted By Ernst
Actually, I want to read the entire first file,...
Actually, I want to read the entire first file, in this case file A. Then I want to add the additional files as column arrays. Think about it as a matrix, instead of adding rows to file A, I want to...
2,133
Posted By Ernst
Adding Multiple Files via Columns
I have a number of files with multiple rows that I need to add together.
Let say I have 10 files:

Each file has a great number of rows and columns. I need to add these files together the...
4,179
Posted By Ernst
It works great! Many thanks!
It works great! Many thanks!
4,179
Posted By Ernst
How do I remove the duplicate lines in this file?
Hey guys, need some help to fix this script. I am trying to remove all the duplicate lines in this file.
I wrote the following script, but does not work. What is the problem?

The output file...
1,483
Posted By Ernst
This is what I keep on getting when I try it. ...
This is what I keep on getting when I try it.

awk: syntax error near line 1
awk: bailing out near line 1

Same issue with previous response

I even added the line below

but to no avail.
...
1,483
Posted By Ernst
Can someone tell me what's wrong with this code? ...
Can someone tell me what's wrong with this code?

#!/usr/bin/ksh
echo Enter a value for p
read p
a=16384
b=1228800
c=2914
expr $c '*' $c > e
expr $a/$b > x
cat e | expr $x/$e > y
expr $p...
1,483
Posted By Ernst
Enter third column & Perform Operation
I am trying to enter a third column in this file, but the third column should that I call "Math" perform a some math calculations based on the value found in column #2.
Here is the input file:

...
897
Posted By Ernst
I tried the following: awk '{print $1, $5, $7}'...
I tried the following:
awk '{print $1, $5, $7}' stl.hi > stl1.hi
grep -v "^=" stl1.hi > stl2.hi
and
sed '/^$/d' stl2.hi > stl3.hi
Neither works. Not sure how to get the specific of Buckle=A
897
Posted By Ernst
Extracting Tag along with specific lines
I have this input file:

and the desired output is as follows:
Desired Output


This is a sample taken from a huge file. Basically, the script should take the tag (TDK11..1>) add everything...
1,082
Posted By Ernst
Sorry, I posted the wrong input file again: It...
Sorry, I posted the wrong input file again:
It was supposed to be this one


---------- Post updated at 04:44 PM ---------- Previous update was at 04:41 PM ----------

vgersh99,

Yours works....
1,082
Posted By Ernst
Unfortunately, neither code works for me. They...
Unfortunately, neither code works for me. They kept printing only the first column.
Let me post the real file that I am using so you can try it also.
HTHa0101013> ru
MOD_0_1: 20.5[dB]...
1,082
Posted By Ernst
Retrieving a specific value
I have this input file:


I want to get the following output file:
Output


Basically, the program would scan the file and look for every instance where the value is < 14.0 dB. The program...
2,948
Posted By Ernst
Great! I need to take this one step further: I...
Great! I need to take this one step further:
I have this input file

and I want to get this output


The formula to get the value Cloumn is as follows:


Of course the program needs to scan...
2,948
Posted By Ernst
ctsgnb, Can you explain to me the structure...
ctsgnb,

Can you explain to me the structure of your code? I need to understand what the i's and the j's do. How does the system know which line to retrieve and where to place them in the file.
...
2,948
Posted By Ernst
It looks like the sample file is working. I will...
It looks like the sample file is working. I will run my big file over the weekend to try to validate the results.
2,948
Posted By Ernst
uname -a env
uname -a

env
2,948
Posted By Ernst
This is the error I get with "awk"
This is the error I get with "awk"
2,948
Posted By Ernst
ctsgn, I meant to send my last reply to you....
ctsgn,

I meant to send my last reply to you. The output you posted is what I need. But my file is empty when I run your code.
nawk -v N="$(( $(grep '>' tst | wc -l) ))"...
2,948
Posted By Ernst
I am not sure about what's going on, but my...
I am not sure about what's going on, but my output file is empty when I run the script. I did not change anything. I just copied and pasted. any idea?
Thanks!

---------- Post updated at 03:44 PM...
2,948
Posted By Ernst
What I really want is the following: INPUT...
What I really want is the following:
INPUT FILE:


OUTPUT FILE:


When you write the code, keep in mind that the input file might contain more info from epsilon, theta, sigma and so on. I just...
2,948
Posted By Ernst
Let me try to make it easier. This is my input...
Let me try to make it easier.
This is my input file:


This is my desired output file:


How do I rearrange the input file to get the desired result?
Showing results 1 to 25 of 89

 

Featured Tech Videos

All times are GMT -4. The time now is 11:18 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy