Sponsored Content
Top Forums Shell Programming and Scripting I need help to create a file using Perl Post 302347892 by romanhr on Wednesday 26th of August 2009 09:42:27 PM
Old 08-26-2009
I need help to create a file using Perl

Hi, i have some files in text format and i want to create a file with all the information in the others files, but i don't want copy all the information exactly i just need the information from the fourth line to the end of file

I will try to explain with an example:

file1.txt

abc
abc
abc
abc
cde1
cde1

file2.txt

abc
abc
abc
abc
cde2
cde2

and i want a file like this

file.txt

cde1
cde1
cde2
cde2

I wonder if it is possible to make it using PERL, if somebody can help me i will apreciate Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

create a directory in perl

Hi Guys!!!!!!!!!!!!!!!!!!!!! can we create or copy directories in perl without using system commands like "mkdir" and "cp" script needed urgent !!!!!!!!!!!!!!!!!!!!!!!!!!! cheers, aajan (7 Replies)
Discussion started by: aajan
7 Replies

2. Shell Programming and Scripting

create an user in perl

hi friends, i want to create an new user in my home directory , only just for checking. if it is possible, please help me. thanks (1 Reply)
Discussion started by: praneshbmishra
1 Replies

3. AIX

create widgets using perl pk module

hi I am posting this for my friend... is it possible to create widgets using perl pk module in IBM AIX 5.3? They dont have a GUI so is it possible to create the above mentioned thing in a CUI? thanks! Sathish (1 Reply)
Discussion started by: sathumenon
1 Replies

4. Shell Programming and Scripting

Create tab-delimited file of outputs - Perl

Title is very broad, but here's an outline of what I have done so far: - I have multiple subdirectories containing multiple *.fna files of DNA sequences - I've been able to traverse these subdirectories and create a tab-delimited text file (i.e. the association file) that shows the contents of... (1 Reply)
Discussion started by: shwang3
1 Replies

5. Shell Programming and Scripting

how to create a file in perl

hey gurus! i m a perl newbie!! i want to create an empty file and also directory in perl... how to print a msg if the present working directory has ".db" extension. like in shell if ] ; then echo "hello " i want to do this in perl!! please help.. (4 Replies)
Discussion started by: tprayush
4 Replies

6. Shell Programming and Scripting

How to create a xml file using Perl Script

Hi All, I have some data which needs to be saved in the xml file format.Can you guys please let me know how to do this using perl script. NOTE: the template of the xml file shall be depending on validation of the data done for some requirements. Basically to summarise, the fields in the xml... (5 Replies)
Discussion started by: girish.raos
5 Replies

7. Shell Programming and Scripting

How to create hash dynamically in perl?

Hi, I have one file name file.txt It has the following contents: #File Contents StartTime,EndTime,COUNTER1,COUNTER2,COUNTER3 12:13,12:14,0,1,0 The output should be like this: StartTime: 12:13 ENDTIME: 12:14 (2 Replies)
Discussion started by: vanitham
2 Replies

8. Programming

perl script to create hash.

Hi, I have the xml file file this, perl script to create hash<p> <university> <name>svu</name> <location>ravru</location> <branch> <electronics> <student name="xxx" number="12"> <semester number="1"subjects="7" rank="2"/> </student> <student name="xxx"... (1 Reply)
Discussion started by: veerubiji
1 Replies

9. Programming

help need in the perl script that create one xml file form multiple files.

Hi every one, Please excuse me if any grammatical mistakes is there. I have multiple xml files in one directory, I need to create multiple XML files into one XML file.example files like this</p> file1:bvr.xml ... (0 Replies)
Discussion started by: veerubiji
0 Replies

10. Shell Programming and Scripting

Using perl or awk to create ngrams

Hello, I am interested in writing a context driven NGram analysis i.e. detecting the frequency of utterance of a given character based on its immediate context i.e. the character which can preced and follow the given entity. In the case of Intial and Final the context would be immediate character... (4 Replies)
Discussion started by: gimley
4 Replies
install(1B)					     SunOS/BSD Compatibility Package Commands					       install(1B)

NAME
install - install files SYNOPSIS
/usr/ucb/install [-cs] [-g group] [-m mode] [-o owner] filename1 filename2 /usr/ucb/install [-cs] [-g group] [-m mode] [-o owner] filename... directory /usr/ucb/install -d [-g group] [-m mode] [-o owner] directory DESCRIPTION
install is used within makefiles to copy new versions of files into a destination directory and to create the destination directory itself. The first two forms are similar to the cp(1) command with the addition that executable files can be stripped during the copy and the owner, group, and mode of the installed file(s) can be given. The third form can be used to create a destination directory with the required owner, group and permissions. Note: install uses no special privileges to copy files from one place to another. The implications of this are: o You must have permission to read the files to be installed. o You must have permission to copy into the destination file or directory. o You must have permission to change the modes on the final copy of the file if you want to use the -m option to change modes. o You must be superuser if you want to specify the ownership of the installed file with -o. If you are not the super-user, or if -o is not in effect, the installed file will be owned by you, regardless of who owns the original. OPTIONS
-c Copy files. In fact install always copies files, but the -c option is retained for backwards compatibility with old shell scripts that might otherwise break. -d Create a directory. Missing parent directories are created as required as in mkdir -p. If the directory already exists, the owner, group and mode will be set to the values given on the command line. -s Strip executable files as they are copied. -g group Set the group ownership of the installed file or directory. (staff by default.) -m mode Set the mode for the installed file or directory. (0755 by default.) -o owner If run as root, set the ownership of the installed file to the user-ID of owner. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
chgrp(1), chmod(1), chown(1), cp(1), mkdir(1), strip(1), install(1M), attributes(5) SunOS 5.10 14 Sep 1992 install(1B)
All times are GMT -4. The time now is 01:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy