Search Results

Search: Posts Made By: santosh2626
15,586
Posted By santosh2626
OK can you explain the code in clear that you...
OK can you explain the code in clear that you used. So that i will try with the original log file i have.

Thanks for the help.
15,586
Posted By santosh2626
Thanks Chubler. Yes this displayed only the...
Thanks Chubler.
Yes this displayed only the lines with the time stamp.
But not from last hour. All the lines from last 4days are also displayed.
appreciate your help.
15,586
Posted By santosh2626
Thanks Chubler, This avoided the files that...
Thanks Chubler,

This avoided the files that do not have timestamp at the start of the file.
But displayed all the lines with the time stamp and also lines in the missdle without timestamp.

And...
15,586
Posted By santosh2626
the initial lines are the start of the log file....
the initial lines are the start of the log file. It did not do awk. displayed everything in the file


****************Start Display Current Environment **********
Host OPerating Syatem is linux,...
15,586
Posted By santosh2626
Thanks chubler that awk worked. But It...
Thanks chubler
that awk worked.
But It displayed everything in the log file.
Not just 1 hour back.
15,586
Posted By santosh2626
Hello chubler. Thanks for the post/ But...
Hello chubler.
Thanks for the post/
But getting the following syntax error.

awk: =F[[ /:]
awk:^ syntax error


And will this work for the format i displayed in the log sample?
15,586
Posted By santosh2626
Thanks in advance. I am using kshell. And the...
Thanks in advance.
I am using kshell. And the code i displayed above also not working.
please help me in getting the lines for the correct format. Can use grep or awk command.

---------- Post...
15,586
Posted By santosh2626
Pick the last one hour lines from log matching this pattern.
Hello please help me on this,

pick the last one hour lines from the log, which have the prefix time format like this.

[2/5/12 10:50:12:148 EDT] log message
[2/5/12 10:50:13:324 EDT] log...
2,885
Posted By santosh2626
[8/5/13 9:50:45:456 EDT] CBWIJO1: error occured...
[8/5/13 9:50:45:456 EDT] CBWIJO1: error occured while connecting to server.
[8/5/13 9:50:46:123 EDT] CBWIJ15: check for database connection.

this is just a sample.
I need to find the for pattern...
2,885
Posted By santosh2626
Pattern from a log within last hour
I want to extract a pattern from a log file within last hour.

I am doing
grep "pattern" filename | tail -1

It gives the last latest pattern but not within last hour.

and if the pattern...
2,581
Posted By santosh2626
sed -e 's:^.*/::' -e 's/ .*//' readme.txt | while...
sed -e 's:^.*/::' -e 's/ .*//' readme.txt | while read file
do
find directory1 -name $file -exec cp {} directory2/ \;
done
hi in place of that copy command after find i want to use chmod 775....
2,961
Posted By santosh2626
Switch between root and user in the same script.
I am writing a korn shell script where i need to switch to root in between and again exit from root to normal user and continue other commands.
Is that possible to switch between these two in the...
12,268
Posted By santosh2626
Sorry that i did not put that in a clear way. I...
Sorry that i did not put that in a clear way. I do not want to create the folders by myself. I want the copy command to create itself the subfolders and copy the files.
12,268
Posted By santosh2626
It has to create sub folders. i m using the...
It has to create sub folders.

i m using the command
find /directory1/sub1/ -name $file -exec cp -p {} /directory2/lib/ \;

but in the "sub1" folder i have subfolders and files, which are copied...
12,268
Posted By santosh2626
Copy the files in directory and sub folders as it is to another directory.
How to copy files from one directory to another directory with the subfolders copied.

If i have folder1/sub1/sub2/* it needs to copy files to folder2/sub1/sub2/*.
I do not want to create sub...
2,581
Posted By santosh2626
Thankyou so much. This worked well. But it is...
Thankyou so much. This worked well.
But it is not reading the last filename in the list. While loop ends before reading the last line.

And also if i have subfolders in the directory1 , then how...
2,581
Posted By santosh2626
Thanks for the reply. But i m getting error: ...
Thanks for the reply. But i m getting error:

find: missing argument to '-exec'
find: missing argument to '-exec'
find: missing argument to '-exec'
find: missing argument to '-exec'
2,581
Posted By santosh2626
Thank you for the replies. But i am not getting...
Thank you for the replies. But i am not getting the required output when i try these. May be i am not clear. sorry for that.
I have a text file readme.txt, which consists of all these filenames in...
2,581
Posted By santosh2626
Read a file name from a text file and save it in a variable
i have a text file consists of different file names like:

line 1: lib/libIMb.so message broker file
line 2: lil/imbdfg.lil message broker file

i need to extract...
Showing results 1 to 19 of 19

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