Search Results

Search: Posts Made By: knijjar
5,894
Posted By knijjar
nawk rocks !!! thank you thank you thank you, it...
nawk rocks !!! thank you thank you thank you, it worked like a butter !!!
5,894
Posted By knijjar
Thank you so much, can you please explain me what...
Thank you so much, can you please explain me what exactly you are doing. by the way it did work and thank you so much. I would like to understand your code.
while read -r junk other; do printf...
5,894
Posted By knijjar
Error Message shown below I used strings core >>...
Error Message shown below I used strings core >> coredumpfile and in that file I see the following error

#ch/
$ 3
# h#
wbad switch yylook %d
Input string too long, limit %d
Input string too...
5,894
Posted By knijjar
awk command input string too long, limit
cat filename| awk '{ $1=""; print $0}'


in my file there are few lines that has more than 3000 characters per line and as soon as I run the above command it cores, strings core reveals that the...
3,365
Posted By knijjar
Thank you so much. it worked like a charm, this...
Thank you so much. it worked like a charm, this is exactly what I was trying to do
3,365
Posted By knijjar
Are you saying I need to do the following? the...
Are you saying I need to do the following? the file xyz contains the search strings that has spaces, and the MasterFile is the file that I need to grep for these search strings with spaces. and if...
3,365
Posted By knijjar
Grep command in Linux in a script where the search string has a space
I have a file xyz with the following content
PPPL 0123
PPPL 0006
POFT 0923
POFT 1111
WENT 2323
SEND 2345

I also have another file named MasterFile where it contains the above mentioned data...
1,672
Posted By knijjar
Thanks RavindeSingh13 / Aia, for the solution you...
Thanks RavindeSingh13 / Aia, for the solution you guys provided, it has worked, this is exactly what I was looking for. Made my life so easy !!! FYI, I will remember to post the OS and the version...
1,672
Posted By knijjar
awk -F'[|=]' 'FNR==NR{a[$0];next} ($13 in a)'...
awk -F'[|=]' 'FNR==NR{a[$0];next} ($13 in a)' Input_file1 Input_file2

Which parameter is in $13 from Input_file2
1,672
Posted By knijjar
I do need the whole line where the ip is found in...
I do need the whole line where the ip is found in file2,

This solution did work for the examples I provided in this case but

/usr/xpg4/bin/grep -Ff file1 file2 > file4


when I apply the...
1,672
Posted By knijjar
user1@server2% grep -h Usage: grep -hblcnsviw...
user1@server2% grep -h
Usage: grep -hblcnsviw pattern file . . .

I dont see the Option grep -F for the grep, I am on SunOS 5.10

---------- Post updated at 06:13 PM ---------- Previous update...
1,672
Posted By knijjar
Grep -w ip address from a file isnt working need help
I have a file "file1" that contains several ip address [only ip address that i want to search in file2], and the "file2" contains several records [close to 100000], each line in file2 contains...
1,679
Posted By knijjar
vgersh99 Thank you So much !!! Works like a...
vgersh99 Thank you So much !!! Works like a butter !!! :cool:

---------- Post updated at 11:55 AM ---------- Previous update was at 11:39 AM ----------

Here is the problem when I use a variable...
1,679
Posted By knijjar
I get the following error Variable syntax ...
I get the following error Variable syntax


/usr/bin/nawk "/# 111[.]46[.]14[.]10$/,printed==5 { ++printed; print; }" abcxyz
Variable syntax

/usr/bin/nawk "/^111.46.14.10$/,printed==5 {...
1,679
Posted By knijjar
Help with nawk (Exact Match)
I have a file with the contents below "lets say the name of the file is abcxyz" shown at the end of this.

I am using nawk to find the exact ip address and the 6 lines after the match is found...
2,477
Posted By knijjar
Can we use this code to search alpha numeric...
Can we use this code to search alpha numeric strings as well? instead of IP addresses

If the ipfile contains the following contents


80:00:1f:0e:03:c0:d7:21:50:20:bf...
2,133
Posted By knijjar
the logical process I have considered is the...
the logical process I have considered is the suggestion from RudiC
I am going to perform the checks in myfirst script but the only catch here is I cannot modify my first script heavily ...

my...
2,133
Posted By knijjar
OS is SunOS 5.10 Generic_144488-04 sun4u sparc...
OS is SunOS 5.10 Generic_144488-04 sun4u sparc SUNW,Sun-Fire-V490

This is what I have tried so far ..

for i in $(find /path/to/search -type f -mmin -10)
do
if [[ -s "${i}" ]]; then
...
2,133
Posted By knijjar
Sun Solaris 10
Sun Solaris 10
2,133
Posted By knijjar
find: bad option -mmin find: [-H | -L]...
find: bad option -mmin
find: [-H | -L] path-list predicate-list
2,133
Posted By knijjar
How to check if there is a file in the last 10 mins?
I have a script that runs every hour from the crontab (see the settings of the crontab below) (15 mins past the hour)

15 * * * * /home/usr/usr1/ProvAll

This script saves two files in the...
2,477
Posted By knijjar
Thank you /usr/xpg4/bin/awk ' (NR == FNR) {...
Thank you

/usr/xpg4/bin/awk ' (NR == FNR) { A[$0]; next } ($0 in A) { c = 7 } !(c && c--) ' "$ipfile" $infile.old > $infile

This one worked !!!
2,477
Posted By knijjar
ipfile will only have ip address nothing else ...
ipfile will only have ip address nothing else

For example
111.46.14.10
111.46.14.101
111.46.14.102

the script should take these as the input and then look for each ip address in teh infile...
2,477
Posted By knijjar
Let me please reiterate my issue, From the Input...
Let me please reiterate my issue, From the Input file, I need to search for an exact Match of the IP address, for example If I search for 111.46.14.10, it should only find 111.46.14.10 IP address not...
2,477
Posted By knijjar
I tried to set up the script and I am getting...
I tried to set up the script and I am getting teh following error !!!
more script_IPRemove.sh
#!/usr/bin/ksh -x
infile=./infile
/usr/bin/cp -p $infile $infile.old &&
/usr/bin/awk ' (NR == FNR)...
Showing results 1 to 25 of 60

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