Search Results

Search: Posts Made By: DTechBuddy
2,624
Posted By DTechBuddy
Delete all data before first space occurence
Hi Guyz,

Can anyone help me in the following:-

I want to delete all that is there in my file that occures before the first space comes.
Eg. My file InputFile conatins the following:

123...
13,011
Posted By DTechBuddy
Capture first N Bytes from first line in a file
Hi Guyz,

I need to capture first N Bytes from the first line of my file.

Eg. If i have following data in File1

414d51204541495052475731202020204a910846230e420c Hello 3621363663212 Help...
2,623
Posted By DTechBuddy
Help with Global Variable
Hi Guyz,

I have a requirement like, i have to run a script every hour to count the number of errors encountered.
At the end of the day, i need to send them the total number of errors, that have...
2,675
Posted By DTechBuddy
Thankyou !!!!
Hey Guyz,
Both the codes worked as expected.
Thanks a lot.
Cheers :b:
2,675
Posted By DTechBuddy
Capture this value in variable ????
Thnx Guyz,
The above code also worked as expected. :b:

Now, I want this value in between the tags to be captured in a variable.
I want to search my file for number of occurances for this value....
17,921
Posted By DTechBuddy
Hi Guyz, Both the codes worked. Thnx a...
Hi Guyz,
Both the codes worked.

Thnx a lot. :b:
17,921
Posted By DTechBuddy
echo '<ABC>Hello</ABC><BCD>How r u?</BCD><CDE>GOD...
echo '<ABC>Hello</ABC><BCD>How r u?</BCD><CDE>GOD Bless u</CDE>' |sed 's/<\/[^>]*>/&\n/g'

Oops! it gave me alphabet n after every tag end.

I tried following:

echo '<ABC>Hello</ABC><BCD>How...
17,921
Posted By DTechBuddy
How to enter a newline after every XML tag end?
Hi Guyz,

I have an XML message in following format:


I want my contents to be formatted in following order:


i.e. I want a newline after every XML tag end.
How to do this?

Thnx in...
2,675
Posted By DTechBuddy
Thankz
Thnx Ygor.
It worked. :b:
2,675
Posted By DTechBuddy
Get value in between a pattern from each line in file
Hi Guyz,

I have a flat file with some data as below:-



I need only the data within tags <XYZ>, from each line of the file.

My desired output:-



Tried a lot, but not getting...
3,260
Posted By DTechBuddy
Insert two newline after some pattern
Hi,

I need to insert two newline characters after matching of a pattern in each line of a file.

Eg. If i have a file with contents as follows:-


Now, i want output as follows :-

...
4,445
Posted By DTechBuddy
Solved
Ya!, it worked perfectly as required.
Thnx a lot. :o

Cheers Guyz, :b:
4,445
Posted By DTechBuddy
Not solved yet.
I tried this command:-

cat FileName | sed -e 's#<ABC>[0-9]\+</ABC>##g'

It's not working.
No effect on my FileName. :(
4,445
Posted By DTechBuddy
Actually, my full requirement is :- In a file,...
Actually, my full requirement is :-
In a file, i have some data. Eg.
<A1>1234</A1><A2>5678</A2><ABC>1234</ABC><A3>0987</A3>
<B1>1234</B1><B2>5678</B2><ABC>1234</ABC><B3>0987</B3>...
4,445
Posted By DTechBuddy
Select a pattern from file
Hi,

I have a requirement to select only a specific pattern from a flat file and delete its occurance.
For eg.
If my file contains :
<A1>1234</A1>
<A2>5678</A2>
<ABC>1234</ABC>...
1,317
Posted By DTechBuddy
* Solved *
Hi Guyz,
Thnx Panyam, i just entered a newline in my file & it worked.
Was strucked up in this error from last 1 hr.
Thnx. :b:
1,317
Posted By DTechBuddy
"sed" command Problem
Hi Guyz,

i am using sed command in my ksh script.
It is eliminating last record from my flat file, thus i am recieving 1 less record in the new file.

e.g.
MyFile = File1 contains 24...
Showing results 1 to 17 of 17

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