Search Results

Search: Posts Made By: er_ashu
3,544
Posted By er_ashu
How to check if there is only one row in the file?
How can I check if there is only one row in the file? If there are more than one rows, I need to send an email and if there is only one row, do not do anything.


Thanks in anticipation
1,995
Posted By er_ashu
replacing a particular instance in a string globally
Hi,

I'm trying to update the last two characters coming in a string globally in a file.
Here is the sample data:

file1


In file1, I want to have all instances replace where _o is...
3,676
Posted By er_ashu
Grepping a file based on input from a second file
how to grep a file based on another input file

File1

ashu 1 ninetwo hari
qwer 6 givefour jan
fghj 8 noeight mar
vbmi 7 noput feb
--
---

File2

noput
noeight
---
--


Taking...
4,908
Posted By er_ashu
Please advise if any awk or shell script can...
Please advise if any awk or shell script can accomplish this. Any code snippets will be helpful.

Thx
4,908
Posted By er_ashu
Global update on a file based on a table
Hi,

I 'd like to update the below highlighted values in a sample file based on the following table:


8283879A25918000000000005400000000000065629TTF3...
6,114
Posted By er_ashu
I tried but couldn't fine much. Please help.
I tried but couldn't fine much. Please help.
6,114
Posted By er_ashu
Read a file and store each value in a variable
Hi,

How to read a file and put the values in a script. E.g.

file1.txt

02/12/2009;t1;t2

The script should read this file and put these values in 3 different variables x1,x2,x3 which can be...
8,620
Posted By er_ashu
How to get yesterdays julian date
Hi,

Was using date +%Y%j to get current julian date. Can anyone let me know how can I get y'day's julin date. Thx

Did check FAQ but couldn't find anything.

Thanks.
3,348
Posted By er_ashu
There are two set of logs ...one being generated...
There are two set of logs ...one being generated on Unix box and other on Windows. Though monitoring is to be done on both but any advise on 'how to do in Unix' will be fine.

Thanks
3,348
Posted By er_ashu
Log monitor script
Hi All,

I have a question and hope someone will have an answer to that. I'm looking for a way to monitor log files being generated on a windows machine for some specified string and if its...
2,185
Posted By er_ashu
Log monitoring in windows
Hi,

I'd like to know if there is a way to monitor a log file conitnuously for one or more strings and if found, send an alarm. It should also take care not to inlcude the old log file entries.
...
2,176
Posted By er_ashu
match a character in a line and replace
Hi,

I have a file with large number of records. Sample below:

123456789QWERT2U 2 erter
987123678ZXCVB6Y 5 7689
934567123GHJKUI4O 7
-
--
--

I want the 16th character in each...
5,451
Posted By er_ashu
Thanks Kevin for your reply but I fear it doesn't...
Thanks Kevin for your reply but I fear it doesn't work.

if a file has

aaatyui.......
bbbhjkl.....
ccc....

....ddd...
23423
...bbbjkhgf556.....
562
.....eeeee
ffffff.........
5,451
Posted By er_ashu
print last matched pattern using perl
Hi,

If there exist multiple pattern in a file, how can I find the last record matching the pattern through perl.

The below script searches for the pattern everywhere in an input file.


#!...
5,887
Posted By er_ashu
Thanks Ikon but I need it in percent. Please...
Thanks Ikon but I need it in percent. Please advise.
5,887
Posted By er_ashu
monitoring cpu and memory of the unix box
Hi all,

Unix has the TOP and SAR command to monitor machine's performance. Can it be used in a script to alert if the cpu utilization is more than 80 or memory used is more than 90.

Is SAR...
3,248
Posted By er_ashu
Artificial Intelligence Bot Like 'Gollum' in perl
Hi all,

I'll like to create an AI bot just like 'Gollum' in perl. Why I chose perl is that I'm learning it right now and am fascinated by its capabilities.
I don't know how much time will it...
74,336
Posted By er_ashu
If you are using a shell script in command...
If you are using a shell script in command parameter of AutoSys, check for the exit status and create an alert mechanism based on that.
And do check with your AutoSys support team on alerts and max...
9,806
Posted By er_ashu
Many thanks........
Many thanks........
9,806
Posted By er_ashu
Thanks NYankz for your quick reply but I didn't...
Thanks NYankz for your quick reply but I didn't get it & also didn't work.Can you please let me know what are you doing there.

And, here is what I have done.


origloc=/original/path/location...
9,806
Posted By er_ashu
looping through subdirectories
Hi,

How to loop through all the subdirectories in a directory, merge the files present in it to a single file in that subdirectory itself and remove the original files?

Please advise.
3,487
Posted By er_ashu
I tried doublequotes too but that too isn't...
I tried doublequotes too but that too isn't working.

SELECT system_k FROM system WHERE sys_o="$var "
3,487
Posted By er_ashu
Reading from a file and passing the value to a select query
Hi all,

Here is my problem. I want to read data from a file and pass the variable to a select query.
I tried but it doesn't seem to work. Please advise. Example below.



...
4,392
Posted By er_ashu
Many Thanks Franklin for this..you rock..
Many Thanks Franklin for this..you rock..
4,392
Posted By er_ashu
Franklin, You rock. But when I use this: ...
Franklin,

You rock.
But when I use this:


awk 'NR==FNR{a[substr($0,1,5)];next}
NF<3{next}
substr($1,2,5) in a {print > "matched.txt";next}
{print > "notmatched.txt"}' file2 file1


I...
Showing results 1 to 25 of 55

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