Search Results

Search: Posts Made By: ther2000
3,128
Posted By ther2000
Thank you so much that works great!
Thank you so much that works great!
3,128
Posted By ther2000
Sorry
This is the one I tried and I got the above results:


sed '/OCP/d;/PASSTHRU RESET/d;/Reason/!d;s/ \- /,-,-,/;s/ : /,/;s/\([0-9\.]*\),DIAG[^-]*/&,$DATE,\1/;s/\.,/,/;s/-$//' tst
3,128
Posted By ther2000
That one is giving me this: ...
That one is giving me this:


07/07@04:03:34 - 10.7.2.194 ,DIAG 3x3b: Reason: code 0x60, Sent by kernel,07-08-2011,
07/07@04:03:34 - 10.7.2.194 ,DIAG 3x3b: Reason: code 0x60, Sent by...
3,128
Posted By ther2000
This is the output I am getting with that sed...
This is the output I am getting with that sed command:

07/07@04:03:34 ,-,-, 10.7.2.194 ,DIAG 3x3b: Reason: code 0x60
07/07@04:03:34 ,-,-, 10.7.2.194 ,DIAG 3x3b: Reason: code 0x60
07/07@04:04:14...
3,128
Posted By ther2000
Nawk Format
Hi! I have a file which I want to search daily for any line that contains the work 'Reason' and I want to take that line and put the data in a certain format using awk or nawk....I do not have gawk...
2,061
Posted By ther2000
I don't think it does..I didn't see anything...
I don't think it does..I didn't see anything about it in the man pages and this is the error I got:



Jul--%-d
PSP6-SYSG-PC1>>date -d '+3 days' +%b--%-d
date: illegal option -- d
usage: ...
4,053
Posted By ther2000
Date Format - preserve whitespace
I am trying to change the date format for the following:


YESTER=`TZ=aaa24 date +%b" "%d | sed 's/0/ /'`


TraceList=$(ls -ltR /pdt/logs | grep "$YESTER" | awk '{print $9}')
...
2,061
Posted By ther2000
ksh/nawk help with if statement to choose between 2 files
Hi! I am having a bit of a problem with my script. There are two different date formats that may appear in a file, either Jul-12 or Jul--6. I tried to create an if statement that searches for one...
2,219
Posted By ther2000
Wow
Thanks! Silly mistake on my part...:D
2,219
Posted By ther2000
Nawk Script not working
Any idea why this isn't working?


YESTERF=`TZ=aaa24 date +%b"-"%d | sed 's/-0/--/'`


filelist2=$(find /export/home/gen/cks/traces \( -name \*YESTERF\* -name \*DNA\* \) -print | tr '\n' '...
2,303
Posted By ther2000
No...Sorry, my mistake... it should be: ...
No...Sorry, my mistake... it should be:


10.7.334.245-ADM-Cisco-Jul--1-13-22-33.txt


---------- Post updated at 04:01 PM ---------- Previous update was at 03:53 PM ----------

Okay,...
2,303
Posted By ther2000
Korn Shell & Nawk...Filename changes
I have the following piece of code:



YESTER=`TZ=aaa24 date +%b"-"%d`

filelist2=$(find /export/home/gen/check/logs \( -name \*$YESTER\* ! -name \*ADM\* \) -print | tr '\n' ' ')

nawk...
10,350
Posted By ther2000
Korn Shell Date Formatting
I am serching for a file created today like so:



TODAY=$(date +"%b-%d")

T_FILE=$(find /export/home/dan/ck/reports/t-status-t.txt-$TODAY-05-00-0?.csv)


The file it is searching for...
3,786
Posted By ther2000
Thanks!! Works wonderfully!
Thanks!! Works wonderfully!
3,786
Posted By ther2000
that works for sending it to output, but its...
that works for sending it to output, but its still putting those IP address on the next line below like so:


Files /export/home/gen/links/inform/10.7.533.44-NDS-AV34-1-Jun-23-1...
3,786
Posted By ther2000
Okay so that works for pulling all of the files...
Okay so that works for pulling all of the files that end in .txt. However, I have created a variable for yesterday and I am trying to only find the files that contain yesterday in the filename. So...
3,786
Posted By ther2000
I tried that but that gives me this error: ...
I tried that but that gives me this error:


find: bad option Scriptingnotes.txt
find: [-H | -L] path-list predicate-list
Files
3,786
Posted By ther2000
To neutronscott
Thanks for your response. Its giving me the following error:


TrainingScript.sh: syntax error at line 62: `filelist=$' unexpected
3,786
Posted By ther2000
awk or nawk in ksh
I am trying to use either awk or nawk in ksh88 to grep the word "Reason" in multiple files and than print the lines that say "Reason" in a particular format that is different from how they would...
5,371
Posted By ther2000
Oh okay...thanks!!
Oh okay...thanks!!
5,371
Posted By ther2000
Beautiful! Thanks...I hadn't tried that one ...
Beautiful! Thanks...I hadn't tried that one

---------- Post updated at 03:14 PM ---------- Previous update was at 11:33 AM ----------

Actually, one more quick question, I am trying to import...
5,371
Posted By ther2000
Thanks everyone for your responses. ctsgnb, your...
Thanks everyone for your responses. ctsgnb, your code almost worked perfectly, and it is my fault for not posting the exact file as it is. Your code printed the line after the line that I need,...
5,371
Posted By ther2000
Unfortuneately perl is not an option for this.
Unfortuneately perl is not an option for this.
5,371
Posted By ther2000
The initial input file looks like the below...
The initial input file looks like the below example. 'line' just means an insignificant line of text. Basically, I am searching for the lines with the keyword 'unknown' in them and their...
5,371
Posted By ther2000
Korn Shell Array maximum value less than other value
I have a text file with several key words that I am trying to isolate. I have grepped for the unknowns in the text file, but each unknown has a corresponding location. I have created an array that...
Showing results 1 to 25 of 25

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