Search Results

Search: Posts Made By: Needhelp2
4,915
Posted By Needhelp2
by the way there is N input files but there...
by the way there is
N input files but there should be only
1 output file
4,915
Posted By Needhelp2
Row to column converter using Awk or grep?
Hello,

Can someone please help me on this.:confused:
I have a file which has more than 1 million lines (XML file).

What I need is:

Search for "abcd" in the input file > output the...
10,707
Posted By Needhelp2
Is there a MODE function in awk or Perl ? So i...
Is there a MODE function in awk or Perl ?
So i can call in my script below.
This code below didnt work.




#!/bin/sh
find . -name '*.txt' | while read line
do
gawk -F '\t' '$2== "A"...
10,707
Posted By Needhelp2
hi guys, i have N txt files , which...
hi guys,


i have N txt files , which looks like this:
I
nput file:


Wanted output:
10,707
Posted By Needhelp2
Thanks a lot guys,. Sorry I am new in this...
Thanks a lot guys,.

Sorry I am new in this area :confused:,i need some more help ...

How can incorporate yours codes in this code below?:confused:


#!/bin/sh
find . -name '*.txt' |...
10,707
Posted By Needhelp2
MODE function in awk
Hello,

Can someone pls help me with some statistical calculation in awk

In excel there is a statistical function called "Mode".

How Mode works:

MODE returns the most frequently...
62,861
Posted By Needhelp2
hi vidyadhar85 your soloution works...
hi vidyadhar85


your soloution works with a single input file.
I have around 100 files all in one folder...
is there any way where i can ref. a folder name instead of file name?


thanks
62,861
Posted By Needhelp2
i need the file names as well .. awk command...
i need the file names as well .. awk command doesnt gives the file names it only prints the lines.

i have many inputfiles


i need something like grep -i (/A/ && /B/) || (/A/ && /C/) ...
62,861
Posted By Needhelp2
thanks , but egrep didnt work for me error...
thanks , but egrep didnt work for me

error message " egrep is not recognized as an internal or external command"

could this be , due to cygwin??
62,861
Posted By Needhelp2
by the way i am using cygwin awk '/A/ && /B/ ||...
by the way i am using cygwin
awk '/A/ && /B/ || /A/ && /C/' filename didnt work
also

gawk '/A/ && /B/ || /A/ && /C/' filename didnt work

Basically any lines in the files that has A AND...
62,861
Posted By Needhelp2
How to do logical AND and logical OR with grep
Hi can someone please help me on this.

I need to perform this code:


Grep any lines that meets the following criteria

(A AND B) OR (A AND C)



I tried this code, but it didn't...
8,137
Posted By Needhelp2
Thanks a lot guys... it works perfectly.:b: ...
Thanks a lot guys... it works perfectly.:b:
Great learning experience :)
8,137
Posted By Needhelp2
This is out. $ cat -vet new.sh ...
This is out.


$ cat -vet new.sh
#!/bin/sh^M$
find . -name '*.FMT' | while read line^M$
do^M$
gawk -F '\t' '$2== "MS2" {print $1, $2}' $line^M$
done
8,137
Posted By Needhelp2
Hi Era, Thank you so much, the xargs...
Hi Era,


Thank you so much, the xargs did the job.No problems:)

I am using cygwin. Can please help on how to check the correct path to the Bash interpreter?

Here is the output of "bash...
8,137
Posted By Needhelp2
hi broli, do i need a search Path ? if...
hi broli,

do i need a search Path ?

if i do, then how should i get the search path?

"All shell scripts should include a search path specification:

PATH=/usr/ucb:/usr/bin:/bin; export...
8,137
Posted By Needhelp2
hi broli i am new to this page and also new...
hi broli

i am new to this page and also new to shell scripting in fact this is my first script

can u pls tell me what is a code tags?

this the code that i am running

#!/usr/bin/sh...
8,137
Posted By Needhelp2
hi guys, still gettting the same error...
hi guys,


still gettting the same error msg.
8,137
Posted By Needhelp2
i try to run this code but didnt work file...
i try to run this code but didnt work

file name new.sh

#! /usr/bin/bash
find .-name '*.txt' | while read line
do
gawk -F '\t' '$2== "MS2" {print $1, $2}'$line
done < output_file.txt

...
8,137
Posted By Needhelp2
Thanks for your response. This works fine ...
Thanks for your response.

This works fine
Gawk -F '\t' '$8 == "HP" || $8 == "IBM" || $8 == "Dell" {print $1, $4, $8 }' c:\cygwin\home\acokayan\export\/*.txt

The only problem that I have is...
8,137
Posted By Needhelp2
The find command should find all the txt files . ...
The find command should find all the txt files .

Then use gwak script to read every txt files (output from find) and print column 1,4 8 only if column 8 has the following values "HP" OR "IBM" OR...
8,137
Posted By Needhelp2
Hi, I have large number of txt files (some...
Hi,

I have large number of txt files (some with same name) located under my home directory and subdirectories --

All files are under this directory (Administrator/home/acokayan) -- in cygwin...
8,137
Posted By Needhelp2
find | gawk --- NOT WORKING
Hi every1:)

I have a problem with find and Pipe to gawk.

Find -name '*.txt' -> works fine.. Gives all the txt file under home directory and sub directories



But when I use it like...
1,670
Posted By Needhelp2
Hi era, Thanks alot , I am...
Hi era,



Thanks alot ,

I am using this gawk -options 'script' zzz/*PC*.txt

and it works .

But I have a minor issue, that all the txt files are not located under the ZZZ folder....
1,670
Posted By Needhelp2
copy columns only IF
Hi again,


Can someone please help me on extracting only certain columns from any text (Tab Delimited).


Eg.

Read all the text files under zzz directory (Tab Delimited).

If the...
3,451
Posted By Needhelp2
hi era, I am trying to modify the code so I...
hi era,

I am trying to modify the code so I can get the count and sum for every event type in one row. This with the five second block.


Wanted output:

...
Showing results 1 to 25 of 29

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