UNIX joins : facing issue while joining three files
Hello ,
I have three files :
sampleoutput1.txt has columns (in the following order) :
sampleoutput2.txt has columns (in the following order) :
sampleoutput3.txt has columns (in the following order) :
I am trying to join three files on the column hostname from the three files.
I want the output records as follows :
Below is the script. Here I am first trying to join the files : sampleoutput1.txt and sampleoutput3.txt. Then I am trying to join the resultant with sampleoutput2.txt
The file sampleoutput1-3.txt is giving correct output but file : sampleoutput1-2-3.txt is not giving correct output.
Please help.
Thanks
Rahul
Last edited by Scrutinizer; 07-27-2015 at 10:01 AM..
Reason: Changed code tags
Dear All,
I am facing an issue related to cronjob and explained below is the case study:
1. I have a java class named "DmCheckRenditionQueue.java" and placed under "/cpc/documentum/product/5.2.5/tomcat/webapps/rendition"
2. When I am using the command
"/usr/openv/java/jre/bin/java -cp... (1 Reply)
Hello
i have a shell script. it is running fine when i manually run at command prompt using following command
./script_file
but while running shell script from crontab, it is giving error in each line. (2 Replies)
I have written a bash script which opens a folder, reads all the *.xml files in it, and pulls the required data that i need from XML tags.
I am using xsltproc (my xsl name) (my xml folder location/*.xml) and running this in a for each loop
The problem is that some XML files are having special... (3 Replies)
Hi,
I have two text files, that need their data joining/concatenation. 'Paste' works for this.
But have an issue when there is mismatch in number of rows in each file.
E.g.
(main file) File1 - has 20 rows
File2 - has 30 rows.
Command 'paste file1 file2 > file3' joins all lines.
I want the... (4 Replies)
Am having a nightmare with a certain piece of code.. have tried almost everything and just cannot see what the issue is..
CREATE OR REPLACE VIEW TOP_EARNER_PER_LOCATION
AS
SELECT E.FIRST_NAME || ' ' || E.LAST_NAME AS EMPLOYEE_NAME,
L.REGIONAL_GROUP AS REGIONAL_GROUP,
... (1 Reply)
Hi,
I have a logrotate configuration which rotates a log every night 1 min before midnight, but somehow its not working and unfortunately not showing any error message as well. Sharing the code for the cron job as well as the conf file, I am using, if some one coule help me..whats wrong with... (2 Replies)
Hi,
I have installed Nagios on Redhat Linux,
I have installed Nagios+Plugins+NRPE on Server A (Host Server) and Nagios Plugins + nrpe on remote linux server (red hat linux)
run the command on remote linux host, it returns nrpe version
usr/local/nagios/libexec/check_nrpe -H localhost
... (1 Reply)
Hi,
i am facing issue while installing weblogic on solaris..its giving me invalid argument error. solaris is intstalled on my VM.
uname -a
SunOS Vishal 5.10 Generic_137138-09 i86pc i386 i86pc
screenshot attached. (5 Replies)
Please let me know how to configure network in suse Linux, I have configured the network using ifup and network manager, it is not giving any error but not working,
using suse Linux 11.0 sp3
I have checked network connectivity is working. (0 Replies)
Dear Community;
I need to join two files but I am facing issues.
1st file has multiple columns. Primary (1st) columns has unique values. There are other columns out of which some has non-ascii characters as well (other language).
Example File below:
1-1001JRL,BiRecurring... (5 Replies)
Discussion started by: mystition
5 Replies
LEARN ABOUT REDHAT
dos2unix
dos2unix(1) General Commands Manual dos2unix(1)NAME
dos2unix - DOS/MAC to UNIX text file format converter
SYNOPSYS
dos2unix [options] [-c convmode] [-o file ...] [-n infile outfile ...]
Options:
[-hkqV] [--help] [--keepdate] [--quiet] [--version]
DESCRIPTION
This manual page documents dos2unix, the program that converts plain text files in DOS/MAC format to UNIX format.
OPTIONS
The following options are available:
-h --help
Print online help.
-k --keepdate
Keep the date stamp of output file same as input file.
-q --quiet
Quiet mode. Suppress all warning and messages.
-V --version
Prints version information.
-c --convmode convmode
Sets conversion mode. Simulates dos2unix under SunOS.
-o --oldfile file ...
Old file mode. Convert the file and write output to it. The program default to run in this mode. Wildcard names may be used.
-n --newfile infile outfile ...
New file mode. Convert the infile and write output to outfile. File names must be given in pairs and wildcard names should NOT be
used or you WILL lost your files.
EXAMPLES
Get input from stdin and write output to stdout.
dos2unix
Convert and replace a.txt. Convert and replace b.txt.
dos2unix a.txt b.txt
dos2unix -o a.txt b.txt
Convert and replace a.txt in ASCII conversion mode. Convert and replace b.txt in ISO conversion mode. Convert c.txt from Mac to Unix
ascii format.
dos2unix a.txt -c iso b.txt
dos2unix -c ascii a.txt -c iso b.txt
dos2unix -c mac a.txt b.txt
Convert and replace a.txt while keeping original date stamp.
dos2unix -k a.txt
dos2unix -k -o a.txt
Convert a.txt and write to e.txt.
dos2unix -n a.txt e.txt
Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt.
dos2unix -k -n a.txt e.txt
Convert and replace a.txt. Convert b.txt and write to e.txt.
dos2unix a.txt -n b.txt e.txt
dos2unix -o a.txt -n b.txt e.txt
Convert c.txt and write to e.txt. Convert and replace a.txt. Convert and replace b.txt. Convert d.txt and write to f.txt.
dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
DIAGNOSTICS BUGS
The program does not work properly under MSDOS in stdio processing mode. If you know why is that so, please tell me.
AUTHORS
Benjamin Lin - <blin@socs.uts.edu.au>
Bernd Johannes Wuebben (mac2unix mode) <wuebben@kde.org>
MISCELLANY
Tested environment:
Linux 1.2.0 with GNU C 2.5.8
SunOS 4.1.3 with GNU C 2.6.3
MS-DOS 6.20 with Borland C++ 4.02
Suggestions and bug reports are welcome.
SEE ALSO unix2dos(1)mac2unix(1)1995.03.31 dos2unix v3.0 dos2unix(1)