Sponsored Content
Top Forums Shell Programming and Scripting I need help to create a file using Perl Post 302347918 by FlyingSquirrel on Thursday 27th of August 2009 01:20:18 AM
Old 08-27-2009
romanhr,

Try this...

Code:
#!/usr/bin/perl -w
while (<*.txt>) {                                 #for each .txt file
   open (FH, "<$_") or die "Can't open file $_";  #  open file handle
   while (<FH>) {                                 #  while not end of file
      if ($. > 4) {                               #    if line number > 4 
         print $_;                                #       print full line incl. end of line char
      }
   }
   close (FH);                                    #  close file handle
}

 

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
FMTUTIL(1)							     TeX Live								FMTUTIL(1)

NAME
fmtutil - utility for maintaining TeX format files fmtutil-sys - utility for maintaining TeX format files system-wide SYNOPSIS
fmtutil [OPTION...] COMMAND fmtutil-sys [OPTION...] COMMAND DESCRIPTION
fmtutil is used to create or recreate format and hyphenation files or show information about format files. COMMAND is one of: --all recreate all format files --byengine enginename (re)create formats that depend on the engine enginename --byfmt formatname (re)create the format for format formatname --byhyphen hyphenfile (re)create formats that depend on the hyphenation file hyphenfile --catcfg output the content of the config file --disablefmt formatname disable formatname in config file --edit no-op in TeX Live --enablefmt formatname ensable formatname in config file --help print a summary of commands and options --listcfg list (enabled and disabled) configurations, filtered to available formats --missing create all missing format files --refresh recreate only existing format files --showhyphen formatname print the name of the hyphenation file for the format formatname --version show version info OPTIONS
--cnffile file specify the configuration file fmtutil should use --dolinks (not implemented, just for compatibility) --fmtdir directory set the destination directory for format files generated by fmtutil to directory --force (not implemented, just for compatibility) --no-engine-subdir don't use engine-specific subdir of the fmtdir --no-error-if-no-format exit successfully if no format is selected --quiet be silent --test (not implemented, just for compatibility) FILES
fmtutil.cnf default configuration file SEE ALSO
kpsewhich(1) BUGS
None known, but report any bugs found to <tex-k@tug.org> (mailing list). AUTHOR
fmtutil was written by Thomas Esser <te@dbs.uni-hannover.de> and is in the public domain. This manual page was written by C.M. Connelly <c@eskimo.com>, for the Debian GNU/Linux system and later slightly adapted for the teTeX 3 release. TeX Live June 2011 FMTUTIL(1)
All times are GMT -4. The time now is 06:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy