I am beginner to unix so I am having a hard time writing code , as of now I have just wrote down a sample to populate 2 colums , this too is not working .
Last edited by Don Cragun; 05-29-2014 at 10:04 PM..
Reason: Add CODE tags.
I have a control file which tells me which are the fields in the files I need to compare and based on the values I need to print the exact value if key =Y and output is Y , or if output is Y/N then I need to print only Y if it matches or N if it does not match and if output =N , then skip the feild... (7 Replies)
Problem :
I want to create a separate file for country list if condition is true. Please help.
*****************************************************
Input file:
SV-INCR-139302-365540488-201104090934.sqllog
SV-INCR-1082-552793184-201104040805.sqllog
SV-INCR-1077-855045741-201104040805.sqllog... (4 Replies)
Hi,
I would like to sort a list in different ways:
1> Unique based on Field 1 with highest Field 4
For Instance Input:
1678923450;11112222333344;11-1x;2_File.xml
1678923450;11112222333344;11-1x;5_File.xml
1234567890;11113333222244;11-1x;3_File.xml
Output:
... (7 Replies)
Dear All,
I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File.
The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files.
Any... (14 Replies)
Hi , I want to compare first 3 columns of File A and File B and create a new file File C which will have all rows from File B and will include rows that are present in File A and not in File B based on First 3 column comparison.
Thanks in advance for your help.
File A
A,B,C,45,46... (2 Replies)
Hi Good morning all,
I want to create script file with multiple commands.
For ex:
pmrep connect is one of the command to connect to repository.
pmrep objectexport is another command to export objects to a file.
These commands should run sequentially.But when i try to execute this, the first... (4 Replies)
HI All,
I'm embedding SQL query in Script which gives following output:
Assignee Group Total
ABC Group1 17
PQR Group2 5
PQR Group3 6
XYZ Group1 10
XYZ Group3 5
I have saved the above output in a file.
How do i sum up the contents of this output so as to get following output:
... (4 Replies)
I have requirement to split below file (sample.csv) into multiple files by using the unique columns (first 3 are unique columns)
sample.csv
123|22|56789|ABCDEF|12AB34|2019-07-10|2019-07-10|443.3400|1|1
123|12|5679|BCDEFG|34CD56|2019-07-10|2019-07-10|896.7200|1|2... (3 Replies)
Discussion started by: RVSP
3 Replies
LEARN ABOUT DEBIAN
arch::tempfiles
Arch::TempFiles(3pm) User Contributed Perl Documentation Arch::TempFiles(3pm)NAME
Arch::TempFiles - help to manage temporary files/dirs
SYNOPSIS
use Arch::TempFiles qw(temp_file_name temp_file temp_dir);
# all will be removed automatically on the script completion
my $file_name1 = temp_file();
my $file_name2 = temp_file_name("status");
my $dir_name = temp_dir("arch-tree");
use Arch::TempFiles;
my $tmp = new Arch::TempFiles;
$tmp->root($tmp->dir);
my $file_name = $tmp->name;
open OUT, ">$file_name";
close OUT;
DESCRIPTION
This module deals with temporary file names. It is similar to File::Temp, but simplier and more focused. Also, File::Temp is relatively new
and was not shipped with older perl versions.
Both function interface and object oriented interface are supported.
FUNCTIONS /METHODS
The following functions are available:
temp_root, temp_name, temp_file_name, temp_dir_name, temp_file, temp_dir.
The corresponding class methods are available too:
root, name, file_name, dir_name, file, dir.
temp_root [dir]
$tmp->root [dir]
Change or return the root of the temporary files and dirs. The default is either $ENV{TMP_DIR} or "/tmp".
temp_name [label]
$tmp->name [label]
Return the unused temporary file name. The default file name is "/tmp/,,arch-XXXXXX" where XXXXXX is a random number. To change this
name use "temp_root" and/or provide label that replaces "arch".
Please note, that the operation of acquiring the file name using this function/method and actual creating of this file is not atomic.
So you may need to call this method again if the creation is failed, for example if some other process created the same file in the
middle.
temp_file_name [label]
$tmp->file_name [label]
Like "temp_name", but stores the name in the file list that will be removed on the end (on object destruction).
temp_dir_name [label]
$tmp->dir_name [label]
Like "temp_name", but stores the name in the dir list that will be removed on the end (on object destruction).
temp_file [label]
$tmp->file [label]
Like "temp_file_name", but also creates the file.
temp_dir [label]
$tmp->dir [label]
Like "temp_dir_name", but also creates the dir.
BUGS
Awaiting for your reports.
AUTHORS
Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel).
SEE ALSO
For a different interface, see File::Temp.
perl v5.10.1 2005-04-22 Arch::TempFiles(3pm)