Search Results

Search: Posts Made By: chiru_h
7,998
Posted By chiru_h
Merge two files into one file
Hi, I need help with merging two files. My requirement is as below:
File 1:
MachineA
MachineB
File 2:
Process1
Process2
Desired File:
MachineA Process1
MachineB Process2

If file 2...
9,678
Posted By chiru_h
Thanks a bunch! I tried both, but using piece of...
Thanks a bunch! I tried both, but using piece of the command Agama suggested.
9,678
Posted By chiru_h
split XML file into multiple files based on pattern
Hello, I am using awk to split a file into multiple files using command:
nawk '{
if ( $1 == "<process" )
{
n=split($2, arr, "\"");
file=arr[n-1]
...
2,626
Posted By chiru_h
The RPM package I am talking about is created in...
The RPM package I am talking about is created in such a way that it is installed by default under /opt. It is relocatable to any other path using --relocate option. I need to get that value...
2,626
Posted By chiru_h
Base directory of the package
Hello, I have an RPM package for which I need to know the base directory /opt/appdir. But if the package is relocated, then it will be different. I need to get the value dynamically.

I tried to...
1,940
Posted By chiru_h
Modify sections of the line in a file
Hello..
I have a line in a file which I have to edit:

the line looks like:
<![CDATA[(&(|(cn=ABC)(cn=DEF))(objectclass=groupOfUniqueNames))]]>

Sometimes, the section of the line can have only...
11,854
Posted By chiru_h
hey Franklin, I'll have the date as a parameter...
hey Franklin, I'll have the date as a parameter to grep the log file. I am looking to get the logs after that date from the file even if that date is not available in the file.

Thanks..
11,854
Posted By chiru_h
Thanks Franklin, it doesn't work if the date is...
Thanks Franklin, it doesn't work if the date is not present in the log file, but if the date is in the log file, it works like a charm.

Any insight?

Thanks,
Chiru
11,854
Posted By chiru_h
Extract data from log file from or after the specific date
Hi , I am having a script which will start a process and appends the process related logs to a log file. The log file writes logs with every line starting with date in the format of: date +"%Y %b %d...
8,891
Posted By chiru_h
Hi I am using the following awk command for...
Hi I am using the following awk command for splitting the file as suggested. It has been working fine, but now I am getting an error, when the number of patterns are increased.

Below is the...
2,009
Posted By chiru_h
Find the file names from date/time: Need help
Hi All,
I really need help in figuring out how to determine the filenames from the time that is specified as parameter.

The script should take as input - the start time and end time in minutes...
14,997
Posted By chiru_h
replacing files in an EAR file after extracting
{Hello All,
Here is what I am trying to do:


I have an archive file: AppName.ear

jar -tvf AppName.ear
60459 Thu May 01 09:29:36 EDT 2008 /SharedResources/Application/App.dat
67542 Thu May...
54,655
Posted By chiru_h
Thanks Reborg/Franklin..both of them work, but am...
Thanks Reborg/Franklin..both of them work, but am using Reborg's as the other one is changing in some other places where I don't need.

What will be the easiest way of XML parsing - in the sense...
54,655
Posted By chiru_h
replace string in XML with sed
Greetings,
I have an XML : file.xml
<component>
<name>abcd</name>
<value>1234</value>
</component>

I am using sed to replace abcd with the desired value dynamically without...
3,251
Posted By chiru_h
Thanks Danmero, that works 99% perfect. Only one...
Thanks Danmero, that works 99% perfect. Only one thing is that - can I not have the ',' at the end?

Thanks again,
Chiru
3,251
Posted By chiru_h
Edit number of lines in a file to single line
Greetings,
I have a file: hostnames.txt which has -
# cat hostnames.txt
machine1
machine2

I need the output to be saved to a variable as:
HOSTNAMELIST=machine1,machine2

Please advise.
...
8,108
Posted By chiru_h
Thanks Shamrock, that works correctly.. ...
Thanks Shamrock, that works correctly..

-Chiru
8,108
Posted By chiru_h
Appending line number to each line and getting total number of lines
Hello, I need help in appending the line number of each line to the file and also to get the total number of lines. Can somebody please help me.
I have a file say:
abc
def
ccc
ddd
ffff

The...
8,659
Posted By chiru_h
The one challenge I am seeing is that these...
The one challenge I am seeing is that these name-value pairs in the csv file can be in different order. For example,
cat csvfile.csv...
8,659
Posted By chiru_h
Well, maybe I've put my problem in a complicated...
Well, maybe I've put my problem in a complicated way - excuse my English :p

There is an input file(csv file)which has the following lines:

cat csvfile.csv...
8,659
Posted By chiru_h
Simply, here is what I am looking for: from...
Simply, here is what I am looking for:
from the csv file that has below line:
Type:G,Instance:instance1,FunctionalID:funcid,Env:dev,AppName:appname

The output may be as a file or be a variable:...
8,659
Posted By chiru_h
The output is that I should get each value...
The output is that I should get each value corresponding to the name-value pair from the csv file. I am using these variables in another scripts. For example, from the line...
8,659
Posted By chiru_h
Parsing a csv file
I am trying to parse a csv file in the below 'name-value pair' format and then use the values corresponding to the name.

Type:G,Instance:instance1,FunctionalID:funcid,Env:dev,AppName:appname...
4,662
Posted By chiru_h
Thanks guys, I got a direction in implementing...
Thanks guys, I got a direction in implementing this from your responses.

I am seeing one issue.

There is a symlink within a symlinked directory which has to be determined dynamically. For...
4,662
Posted By chiru_h
determining actual directory of a symlinked directory
Hello all,
I have files at /var/dir1/dir2/fil1.log etc.,.

dir2 is symlinked to /export/xxx/dir3


I am trying to monitor the disk space of the mount where these log files are present.
How do...
Showing results 1 to 25 of 75

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