Search Results

Search: Posts Made By: Vitoriung
2,200
Posted By Vitoriung
Correct syntax
Hi,

I want to check if file(s) exist even in subdirectories and perform an action. After searching here couldn't find solution that would work, but made my own solution that works fine:

if [ -f...
3,292
Posted By Vitoriung
Description
OK I will try to give the info, hopefully it will help to understand my issue and it's not confusing too much:

1. Pseudo code version? I am not sure if I understand the question, I want to supply...
3,292
Posted By Vitoriung
Well I have bunch of log files, their names...
Well I have bunch of log files, their names contains MAGT, DISP GWCO etc..., inside the files there is many lines like

[40000] (06/18 00:16:37.077):{0x22A0} {Hofer, Marc} PopulateMessage...
3,292
Posted By Vitoriung
Help with debug the script
Hi,
I have this script, searches and sets variables, then searches and sets more variables from multiple files.
I'd need to debug it a bit.


#!/bin/bash
egrep $1 `find | grep MAGT`...
4,804
Posted By Vitoriung
oh man, that's perfect, I am about to write...
oh man,
that's perfect,
I am about to write my first script thanks to you! ;)

Now I need just figure out your magic tricks with sed command to filter other variables.

I am pretty sure there...
4,804
Posted By Vitoriung
problem seems to be in section where we filter...
problem seems to be in section where we filter the variable, I have tried to move set -x before we set the variable and get:
++ sed -n '/Tag=/ s/^.*Tag=//p' /tmp/resA-8849
+ tag=$'68722\r'
4,804
Posted By Vitoriung
these files are from Windows server, so it could...
these files are from Windows server, so it could make sense?
I don't know why $ sign is there, command is as I wrote grep -- "$tag" *LOGB*, interesting thing is when I try
grep -- "$tag" *

it...
4,804
Posted By Vitoriung
otheus, thanks for quick reply, the line I am...
otheus,
thanks for quick reply, the line I am looking for is obviously:

+ grep $'68722\r' BEA1_LOGB_01_20090305_0001.txtwhat can it mean this "\r" there?
4,804
Posted By Vitoriung
Thank you otheus, it was very helpful, now I...
Thank you otheus,
it was very helpful, now I know how to find and set variable,
but now I am bit struggling to join commands together.

#!/bin/bash
grep -- $1 *LOGA*
grep -- $1 *LOGA*...
4,804
Posted By Vitoriung
Filtering multiple files with variables
Hi,
I spend few hours already searching this forum, but cannot find the solution matching exactly my case.
I have multiple log files, I need to filter them so I get info about certain event.

So...
Showing results 1 to 10 of 10

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