Search Results

Search: Posts Made By: dgmm
28,184
Posted By dgmm
Read file using while loop not reading last line
I have written a script to read the file line by line.
It is reading and printing the lines.
But it is coming out of loop before reading last line.
So I am not able to print last line.
How do I...
4,610
Posted By dgmm
Thank you
Thank you
4,610
Posted By dgmm
Cut Command error cut: Bad range
Hi
Can anyone what I am doing wrong while using cut command.

for f in *.log
do
logfilename=$f
Log "Log file Name: $logfilename"
logfile1=`basename $logfilename .log`
...
43,522
Posted By dgmm
Yes this is working. Here is the code what...
Yes this is working.

Here is the code what I did.

cd $LOG_DIR
for f in *
do
let cnt="cnt + 1"
filename=$f
echo "$filename"
done
echo "total count $cnt"
11,361
Posted By dgmm
Thank you. This worked.
Thank you.
This worked.
1,827
Posted By dgmm
Thank you. This worked.
Thank you.
This worked.
1,827
Posted By dgmm
Hi
I am not looking from ls.
Here is my code and I want to fetch year and month from the file which I have alread read.


cd Log_dir

for f in *.log
do
let cnt="cnt + 1"
logfilename=$f
...
1,827
Posted By dgmm
I have one of the file as ...
I have one of the file as
acs_log_purge_20110517_234239
Got following error.
]+ + awk -F_ {print $(NF-1)} acs_log_purge_20110517_234239
awk: input file "acs_log_purge_20110517_234239": The...
1,827
Posted By dgmm
want to get last year and month from the file
Hi
I have files like

abc_cd_20110302_123423
abc_cd_ef_20110301_123423
abc_cd_ef_20110403_123423
abc_ef_20110401_123423

I want to extract the
the year and month associated with each...
43,522
Posted By dgmm
I am using MKS Toolkit to execute the shell...
I am using MKS Toolkit to execute the shell script.


ls -l *.log | while read -a arr ; do
Current_Filename=${arr[8]} ;
Log "Current_Filename $Current_Filename"
done


Error Unknown...
43,522
Posted By dgmm
How to store files names from a directory to an array
Hi
I want to store the file names into an array.
I have written like this but I am getting error.

declare -A arr_Filenames
ls -l *.log | set -A arr_Filenames $(awk '{print $9}')
index=0...
11,361
Posted By dgmm
Store all the passed arguments in an array and display the array
Hi
I want to write a script which store all the parameters passed to the script into an array.
Once it is stored I want scan through the array and and delete those files for last month present...
1,284
Posted By dgmm
reading: Error performing inpage operation.
While executing my shell get_validations_and_err_rpt_file_from_acs.sh I am getting this error.

reading: Error performing inpage operation.

Can any one please let me know why is this error...
11,047
Posted By dgmm
Hi Chakrapani Thanks for your reply, Do...
Hi Chakrapani
Thanks for your reply, Do you think the grep will work even if it is buffer. Because the script is wrtiing to Logfile and I will be checking the same Logfile in the script. Even...
11,047
Posted By dgmm
Capture all error message in Log file and send the Log file by email
Hi
I have a requirement to write a script to capture all errors in a Logfile and send the file in email.
If there is any error occurred the subject of email will be ERROR , If there are no...
4,805
Posted By dgmm
Hi It is working now. Both are good...
Hi
It is working now. Both are good solution.

Thank you very much.


:b:

---------- Post updated at 03:41 PM ---------- Previous update was at 03:09 AM ----------

Hi
I am just...
4,805
Posted By dgmm
Thanks for the reply. I understand if it does...
Thanks for the reply. I understand if it does not find , I will replace with Zero.
But if the C is present , it has to print from the file for second field.
The above solution does not work.
I...
4,805
Posted By dgmm
Replace a null from grep to a number 0 using sed
Hi
I have a file which contains count for a code. Code is first field and count is second field.
I am trying to search the code and get correspond count.

File look like this. temp.out
...
13,118
Posted By dgmm
Thank you. It worked.
Thank you. It worked.
13,118
Posted By dgmm
here is the result . res SQL*Plus: Release...
here is the result .

res SQL*Plus: Release 10.2.0.4.0 - Production on Tue Aug 17 02:33:49 2010 Copyright (c) 1982, 2007, Oracle.
All Rights Reserved. Connected to: Oracle Database 10g Enterprise...
13,118
Posted By dgmm
sql output to shell variable
Hi
I tried searching but I used to see , this has been answered may times.
But I could not find.

I am looking a SQLPLUS output to be assigned to shell variable.

This is what I coded....
9,449
Posted By dgmm
I tried this ls -l $0 | awk '{print $9 "|" $5}'...
I tried this
ls -l $0 | awk '{print $9 "|" $5}'
awk 'END {print NR}' $0

But it is printing in two different line.
I want the output as Finame,filesize,record count

---------- Post updated at...
9,449
Posted By dgmm
Get the file name file size record count a file
Hi
I want to find file size and record count for a file in same line.

Thanks
7,349
Posted By dgmm
hi alister/drl You have understood correctly...
hi alister/drl
You have understood correctly why I am not interested need to compare whole line.

I mis typed the input field.
Yes there might be a field which numeric
so I will...
7,349
Posted By dgmm
Hi I want to compare for each line and each...
Hi
I want to compare for each line and each field of that line.
Read the first line
split the line to different fields.
Compare
f1.first field with f2.first field
f1.second...
Showing results 1 to 25 of 26

 

Featured Tech Videos

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