Search Results

Search: Posts Made By: wahi80
1,835
Posted By wahi80
Hi, The idea is any line which does not start...
Hi,
The idea is any line which does not start with a data, replace the first character with a backspace.
So I tried the command below:

sed...
1,835
Posted By wahi80
Log4j combining lines to single line
Hi,
Our log4j file contents look like this:
2018-11-20T00:06:58,888 INFO [HiveServer2-Background-Pool: Thread-21912] ql.Driver: Executing...
2,071
Posted By wahi80
Hi RudiC, If you get some time could you...
Hi RudiC,
If you get some time could you explain the code a bit. I'm not that well versed in awk :(

Thanks
2,071
Posted By wahi80
Search term in nth field and replace kth column
Hi,

I have a text file which looks like this
a.txt
A,12,Apple,Red
B,33,Banana,Yellow
C,66,Sky,Blue

I need to search for a particular field(s) in particular column(s) and for that matching...
2,317
Posted By wahi80
Pure Joy!! :b: Thoroughly schooled!
Pure Joy!! :b:
Thoroughly schooled!
2,317
Posted By wahi80
Hi, Chubler_XL's code works perfectly! ...
Hi,
Chubler_XL's code works perfectly!
part-m-00000 was a mistake on my part while pasting the code, it can be removed.

I have a couple of questions regarding the working of the code, mainly how...
2,317
Posted By wahi80
Using awk and grep for sql generation
Hi,

I have a file pk.txt which has table related data in following format


TableName | PK
Employee | id
Contact|name,phone,country

I have another file desc.txt which lists datatype of...
3,615
Posted By wahi80
Hi, 1)Everything ending with *.log is a file ...
Hi,
1)Everything ending with *.log is a file
2) a_m?.log is an instance of "a" monthly file, similarly e_m?.log is instance of "e" monthly file b_?.log is instance of "b" daily file and so on..
3)...
3,615
Posted By wahi80
Find files not matching multiple patterns and then delete anything older than 10 days
Hi,
I have multiple files in my log folder. e.g:

a_m1.log
b_1.log
c_1.log
d_1.log
b_2.log
c_2.log
d_2.log
e_m1.log
a_m2.log
e_m2.log

I need to keep latest 10 instances of each file....
6,395
Posted By wahi80
Admins had blocked access to blogs from work...
Admins had blocked access to blogs from work location.Got home and read point 3.Will try it out tomorrow
6,395
Posted By wahi80
HI, I have worked with parallel in earlier...
HI,
I have worked with parallel in earlier projects. In my current project the Admins will not install GNU parallel. So is there a way out with the code I have written?

Thanks
6,395
Posted By wahi80
I have mentioned in my post I do not have GNU...
I have mentioned in my post I do not have GNU parallel

---------- Post updated at 01:20 PM ---------- Previous update was at 09:02 AM ----------

Is there a way to capture pids of each process...
6,395
Posted By wahi80
Parallel processing and error checking
Hi,
I need to run multiple scripts in parallel. The scripts needs to ensure that x scripts are always running. I trigger 6 jobs in parallel, as soon as one finishes it triggers the next one, but id...
2,138
Posted By wahi80
Grep log file to get line above matching pattern
Hi,

I have a log file that looks like this

"delete" : {
"_type" : "cl",
"_id" : "1000600000000562636",
"_version" : 1,
"status" : 200,
"found" : false
...
1,558
Posted By wahi80
Hi Ravinder, Your solution almost got what I...
Hi Ravinder,

Your solution almost got what I wanted. The only thing is that the code needs to check if the order is same too. I think I missed adding that in my original thread
e.g: t1.txt
a,b...
1,558
Posted By wahi80
Compare line and printing difference
Hi,

I want to compare two files and print out their differences
e.g:
t1.txt
a,b,c,d
t2.txt
a,b,c,d,e,f

Output
e,f

Currently I do this long about way
tr ',' '\n' <t1.txt >t1.tmp
tr...
1,909
Posted By wahi80
Hi, The command will fail when it encounters...
Hi,

The command will fail when it encounters a field starting with number but having characters like
FORD| T976| 7XYZ| 567

will be converted to
FORD| T976|7XYZ|567

7XYZ is affected.

I...
1,909
Posted By wahi80
Remove space before numbers in delimited file
Hi,

I have a file which looks like this
FORD|1333-1| 10000100010203| 100040507697|0002|356.45|5555| SSSSY|KKKKM|1000005|10| N096|10043| C987

I need the output to look like this...
4,773
Posted By wahi80
Hi, Can you explain, how above command works,...
Hi,
Can you explain, how above command works, in building the if condition?
4,773
Posted By wahi80
Create Dynamic if condition
Create Dynamic If condition

Hi,
I have a file color.txt which has data as shown below
Red
Blue
Green
Yellow
White
Pink
Black

Based on a variable I execute a tail command as shown below...
1,191
Posted By wahi80
Make process parallel
Hi,

I have a file which has a list of 200 tables e.g: table.txt
I need to do a count for each table and store it in a file.

So I did something like this:

for TABLE in `cat table.txt`
do...
1,211
Posted By wahi80
Error re-direction and Return code
Hi,

I have a shell script which executes some sql. When the shell script executes the sql's logging is shown on the console. I need to grep some data from this output shown on console. So I do the...
5,361
Posted By wahi80
Hi, I forgot to mention that I'm using this...
Hi,

I forgot to mention that I'm using this command in a shell script. The * works fine at command prompt, but within script I get this error
find: warning: Unix filenames usually don't contain...
5,361
Posted By wahi80
Find: filename in every subdirectory matching a pattern
Hi,

I have multiple directories built in following manner

/app/red/tmp
/app/blue/upd
/app/blue/tmp
/app/green/tmp
/app/red/upd
/app/green/upd

I have filenames having pattern ONE.XXX.dat...
1,606
Posted By wahi80
sed - remove space and . for a pattern
Hi,

I have file which contains following lines
A| 965.|Mr.|35.45| 66.
B| 33.| a456.| 77.

The output should be
A|965|Mr.|35.45|66
B|33| a456.|77

Basically if a Number has space in prefix...
Showing results 1 to 25 of 39

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