Search Results

Search: Posts Made By: kumaran21
4,479
Posted By kumaran21
Hi rdcwayx, ls POT* > temp1 grep -l "ABC"...
Hi rdcwayx,
ls POT* > temp1
grep -l "ABC" POT* > temp2
diff temp1 temp2 |awk '/^</ {print $2}'the above code worked. If only I could have it search the files that were created for the day, that...
4,479
Posted By kumaran21
Hi rdcwayx, I tried your command and it gave...
Hi rdcwayx,

I tried your command and it gave me a syntax error message. I typed to the commands exactly as you have given them, and I checked it twice for any typo error.



---------- Post...
4,479
Posted By kumaran21
I tried the code above but it did not list...
I tried the code above but it did not list filenames as intended instead it output the contents of all the files that did not have the search word.
4,479
Posted By kumaran21
Thanks vbe, that command worked. Now, how do I...
Thanks vbe, that command worked. Now, how do I find out which of those files does not contain the search word. I just want to display the file names.

I have been trying the grep command with the...
4,479
Posted By kumaran21
Thanks Franklin52 The problem is that it...
Thanks Franklin52

The problem is that it searches all the files that begin with POT and there are hundreds. I'm only interested in files that were created for the day.
4,479
Posted By kumaran21
How to use grep
Hi Everyone,

Someone please tell me how to use grep with the -f option.

I need to search for a particular word and display the line that has that word. I need to do this on multiple files so I...
4,163
Posted By kumaran21
Thanks guys, I tried alister's suggestion...
Thanks guys,

I tried alister's suggestion and it works as I want it to, so I'm going with that.

Thank you both for your time, much appreciated.
4,163
Posted By kumaran21
Thank you gaurav1086, The script below may...
Thank you gaurav1086,

The script below may help explain what I have in mind.


if grep -e rlh-1 chkstat.txt | awk '{print $4}' == "$ALIVE"
then
> /dev/null
else
echo "RLH -1...
4,163
Posted By kumaran21
Need a script that will check for changes in a text file
Hi Everyone,

Can someone please show me how to create a script that will search a text file for changes.

For example below is a sample of how the text file would look like,

RLH rlh-1 ...
2,282
Posted By kumaran21
Thanks guys, it turns out that the files are now...
Thanks guys, it turns out that the files are now created with 644 permission, so I don't need to chmod theirs permission anymore.

Will try out your suggestions when the need arise.

Thank you...
2,282
Posted By kumaran21
Hi scottn, when I ran the script below ...
Hi scottn,

when I ran the script below

find /home/files/server2/MYFILES -newer /home/files/timestamp -name CDMYFILES* | grep -v ARCHIVE | xargs -I{} ksh -c "mv {} /home/files/movefiles; chmod...
2,282
Posted By kumaran21
Thank you so much scottn. The command worked...
Thank you so much scottn. The command worked perfectly.

Can you please help me with one more thing, I need to chmod the moved files with 644. I know it can be done with the -exec command but I...
2,282
Posted By kumaran21
Help with find command
Hi everyone,

I need help with the find command. I currently have a script which finds and moves files of a certain name and timestamp.

The problem is that each of those sub directories also...
10,024
Posted By kumaran21
Hi ghostdog74, Thank you for your...
Hi ghostdog74,

Thank you for your suggestion.

But when I ran your code

for i in {1..99999}; do printf "%.6d\n" $i; done > base.txt
it returned the following error

printf: {1..99999}:...
10,024
Posted By kumaran21
Script to check file sequence
Hi everyone,

I need help in creating a script that would check if the file sequence is in order in a particular directory. These are log files that are generated throughout the day.

Example of...
1,850
Posted By kumaran21
Thanks guys. fpmurphy your script worked like a...
Thanks guys. fpmurphy your script worked like a charm, though I'm still trying to figure out how it did it.

If you guys can explain how the scripts work, I would be much obliged.

Thank you so...
1,850
Posted By kumaran21
Hi fpmurphy, thanks for your reply. I'm new to...
Hi fpmurphy, thanks for your reply. I'm new to the unix environment and I dont entirely understand your code.

Perhaps you could explain to me how your code works and how I could use it to format...
1,850
Posted By kumaran21
Need help with formatting an output file
Hi guys,

I need help with formatting the output of a file. Below is the script I use to generate a file called output.xls.

DAY=`TZ=MYT+16 date '+%b'`
DAY1=`TZ=MYT+16 date '+%e'`
ls -ltr...
2,917
Posted By kumaran21
Hi guys, First of all I would like to...
Hi guys,

First of all I would like to apologize for not replying to your posts, I have been away on holiday then went for a training session.

cfajohnson, I tried your script and it listed all...
2,917
Posted By kumaran21
Thank you matrixmadhan & cfajohnson, I wish I...
Thank you matrixmadhan & cfajohnson, I wish I could create scripts as good as you guys but unfortunately I have started using the unix enviroment only recently, hence I cant make heads or tails out...
2,917
Posted By kumaran21
Need to create a script to show what files in what folders
Hi everyone,

I'm stuck with this scenario where our system creates files every night and puts them in several folders according from whom it came from.

I have managed to create a script which...
2,527
Posted By kumaran21
Thank you jimbalaya for your suggestion but...
Thank you jimbalaya for your suggestion but unfortunately it did not work. I was prompting for the password.

Anyway I have managed to a telnet script and run the grep command then exit...
2,527
Posted By kumaran21
Need help with viewing process on another server
Greetings everyone,

I am new to the unix environment and I need help with my question below.

I need to monitor certain critical processes on several servers and we have scripts that will grep...
Showing results 1 to 23 of 23

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