Search Results

Search: Posts Made By: reldb
4,150
Posted By reldb
Thanks All i was able to write my code in shell...
Thanks All
i was able to write my code in shell script via loop and it is working fine/expected.
will share that code
4,150
Posted By reldb
Hi Rudi Thanks for sharing the detail I tried...
Hi Rudi
Thanks for sharing the detail
I tried your solution, and it worked for lines where variable exists exactly 2 times in that particular line.
There are lines in main file where no variable...
4,150
Posted By reldb
Hi Rudi I have idea to do via shell...
Hi Rudi

I have idea to do via shell scripting, read this file line by line, find the 1st variable in line and get the relevant fileName which has the value/records and print it as value...
4,150
Posted By reldb
Awk/sed to replace variable in file
Hi All

I have one file with multiple lines in it, each line has static text and some variable enclosed in <<filename>> as well. e.g. as below

123, <<file1.txt>> this is my name, I stay at...
2,511
Posted By reldb
this will only show the lines with KSH is awesome...
this will only show the lines with KSH is awesome .. it will not showing the lines between BEGIN/END

--- Post updated at 08:14 AM ---

MadeInGermany
your command mention below is working fine...
2,511
Posted By reldb
Awk/sed command to extract the string between 2 patterns but having some particular value
Hi -

i have one file with content as below.

***** BEGIN 123 *****
BASH is awesome
***** END *****
***** BEGIN 365 *****
KSH is awesome
***** END *****
***** BEGIN 157 *****
KSH is...
1,317
Posted By reldb
Need help for faster file read and grep in big files
I have a very big input file <inputFile1.txt> which has list of mobile no

inputFile1.txt
3434343
3434323
0970978
85233
... around 1 million records

i have another file as inputFile2.txt...
1,000
Posted By reldb
Script to alert an error
Hi

I am writing a shell script which will grep for a particular string e.g. "Process has not started" which i am able to find using a simple grep command on this file and then sending an email...
2,591
Posted By reldb
Zip million files taking 12 hours or more
Hi

I have task to zip files based on modified time but they are in millions and it is taking lot of time more than 12 hours and also eating up high cpu
is there any other / better way to handle...
10,191
Posted By reldb
Vi editor auto backup
Hi

I am looking for some option in vi config options to set so that any time any user update/change any file then one backup file (before change) is created automatically which can be used for...
2,255
Posted By reldb
DHeisenberg - Thanks for suggestion. I wrote a...
DHeisenberg - Thanks for suggestion. I wrote a program on similar patter in java and it is working perfectly fine.


RudiC - Thanks for your suggestion, Below one worked fine. (got some error in...
2,255
Posted By reldb
Multi line extraction based on condition
Hi

I have some data in a file as below


******************************
Class 1A
Students absent are :
1. ABC
2. CDE
3. CPE

******************************
Class 2A
Students absent are...
3,190
Posted By reldb
/usr/bin/ksh -E
I saw one script using the first line as below
/usr/bin/ksh -E

I have used -x for debug but couldn't find what is this -E option for ?

Pls let me know what is this -E used for

Thanks
RL
2,771
Posted By reldb
Linux - mailx - attachment - via script/command
Hi

I am trying to send an email using mailx with an attachment but without using uuencode.
as per man page we can use -a option.

I tried below command

mailx -s "test" -a...
5,538
Posted By reldb
Thanks for reply first line is not an issue. ...
Thanks for reply
first line is not an issue.

I agree that without looking detail of the other script its tough to say, even i dont have much info on other script that's the reason i am looking...
5,538
Posted By reldb
Process with tee is not exiting out
Hi

I have a script which we are calling as below from another script but it does not exit out and just hang there.

main.ksh
#!/bin.ksh
echo "test1"
test.ksh | tee /tmp/abc.txt
echo "test2"...
3,254
Posted By reldb
grep in multiple lines
hi

i have kind of below text in a file.
I want to get a complete paragraph starting with START and ending with before another START) which has a particular string say XYZ or ABC


START XYZ...
4,260
Posted By reldb
HP-UX B.11.23 unfortunately i need a fix in...
HP-UX B.11.23
unfortunately i need a fix in case of remsh and then in future might change to ssh where its working fine ..
4,260
Posted By reldb
seems /usr/bin/env is already getting initialized...
seems /usr/bin/env is already getting initialized by remsh
i checked the variable defined in this is getting initialized

echo $LOGNAME

still i am not able to see the value of $USER perhaps...
4,260
Posted By reldb
$USER is not set in remsh but works fine via ssh login
1)
ssh a@b
echo $USER it display the correct value as a (even though i have not defined it in .profile)

2)
remsh b -l a
echo $USER it does not display the value as a (variable is not set...
3,094
Posted By reldb
diff with exact difference format
Hi

when we diff of 2 files then output is showing lines which are different and then we have to manually find which word is different

diff file1 file2

is there any way to show or highlight...
14,011
Posted By reldb
ls -ltr for a future date/time stamp file
Hi

When i do ls -ltr <file1> then it shows me the date and time of the file
if - for whatever reason file has future date/time stamp then ls -ltr is not showing the time, it just shows only date...
48,310
Posted By reldb
Thanks Guys but pls consider this also - I have...
Thanks Guys
but pls consider this also - I have 2 different folders on different machines and i need to verify checksum of each file

---------- Post updated at 01:01 PM ---------- Previous update...
48,310
Posted By reldb
tyler_durden thanks for suggestion there are...
tyler_durden
thanks for suggestion
there are 2 issues

1) first ls wont show the files in sub directories. so we have to use find command. thats fine

2) main issue is still the same. if you do...
48,310
Posted By reldb
Compare the checksum of files in 2 different folders
Hi

I have 2 different folders on different machines. they are supposed to be same but some time for unknown reason they are not. then we have to generate a report for files which are not matching....
Showing results 1 to 25 of 45

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