04-16-2020
Hi
Since we all can read your computer its files, we know exactly what the cause is.
Not!
Please share the code of the script (in code tags -> advanced post/reply).
Otherwise we cant help.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I know this seems like a stupid question.
I am trying to sort an address book. Some peole have first, middle and last names, some only have first and last names.
Eg:
Bob Hope
John Bon Jovi
etc ..
I want to sort this by last name.
I was thinking of using something like sort -k $variable... (5 Replies)
Discussion started by: kevin80
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have 1 million records and want to extract lines betwen 10000 -20000 and put it in another file.
Could you please suggest a command for this.
Thanks in advance (3 Replies)
Discussion started by: unxusr123
3 Replies
3. Shell Programming and Scripting
How can i write a script.?
which lists all X process and gets the start minute of each of them.
thanks (1 Reply)
Discussion started by: Anteus
1 Replies
4. Solaris
Is there any way to find "Number of files" that exists on my solaris parition in the starting of 2009 year ?
I know ctime or mtime will not help and unix wouldnt store creation time.
Only hope i can see ( and i am not sure if that will help ) is that my system is up from last 2 years without... (5 Replies)
Discussion started by: rajwinder
5 Replies
5. Shell Programming and Scripting
I have a file with contents similar to this.
abcd
1234
4567
7666
jdjdjd
89289
9382
92
jksdj
9823
298
I want to write a shell script which count the number of lines that start with the number (disregard the lines starting with alphabets) (1 Reply)
Discussion started by: grajp002
1 Replies
6. Shell Programming and Scripting
Hi,
I want to do the following:
Extract some lines from different files and copy them into one file, with the first column being the line number. I do this with
cat file1 file2 file3 |grep 'xxx' |nl > output.file
Works fine. But if I want to add data of interest from a fourth file to the... (2 Replies)
Discussion started by: paracetamol
2 Replies
7. Shell Programming and Scripting
Hello all! I am writing a script that takes in a directory name as input and if the directory exists, it shows the files inside the directory
here is what I have so far (incomplete) (mostly like pseudocode)
#/bin/sh
echo Please enter the name of a directory
read dir
grep $dir... (2 Replies)
Discussion started by: subway69
2 Replies
8. Shell Programming and Scripting
Hello community,
I created a script to simply query DB and then analize data. The environment where the script will works is two RedHat machines that access both to an external database. My script runs from the first crontab node. But what about if the first node goes down?
What I need is copy... (2 Replies)
Discussion started by: Lord Spectre
2 Replies
9. Shell Programming and Scripting
Hi Power User,
I'm trying to compute this kind of text file format:
file1:
jakarta 100 150
jakarta 170 210
beijing 220 250
beijing 260 280
beijing 290 320
new_york 330 350
new_york 370 420
tokyo 430 470
tokyo 480 ... (2 Replies)
Discussion started by: anjas
2 Replies
10. Shell Programming and Scripting
Hello there,
I'm using a read-while loop to preserve the word Failed within a text file. For example, if the word Failed exist twice in a single text file, my STDOUT should re-direct to a new text file and display Failed twice.
My output is attached to this thread. I would like output to... (4 Replies)
Discussion started by: SysAdminRialto
4 Replies
LEARN ABOUT DEBIAN
chronicle-entry-filter
CHRONICLE-ENTRY-FILTER(1) User Contributed Perl Documentation CHRONICLE-ENTRY-FILTER(1)
NAME
chronicle-entry-filter - Convert blog files to HTML, if required.
SYNOPSIS
Help Options
--help Show a brief help overview.
--version Show the version of this script.
Options
--format The global format of all entries.
--filename The name of the single file to process.
Filters
--pre-filter A filter to run before convertion to HTML.
--post-filter A filter to run after HTML conversion.
ABOUT
This script is designed to receive a filename and a global formatting type upon the command line. The formatting type specifies how the
blog entry file will be processed:
1. If the format is "textile" the file will be converted from textile
to HTML.
2. If the format is "markdown" the file will be converted from markdown
to HTML. The related format "multimarkdown" is also recognised.
3. If the format is "html" no changes will be made.
Once the conversion has been applied the code will also be scanned for <code> tags to expand via the Text::VimColour module, if it is
installed, which allows the pretty-printing of source code.
To enable the syntax highlighting of code fragments you should format your code samples as follows:
Subject: Some highlighted code.
Date: 25th December 2009
Tags: chronicle, perl, blah
<p>Here is some code which will look pretty ..</p>
<code lang="perl">
#!/usr/bin/perl -w
...
..
</code>
Notice the use of lang="perl", which provides a hint as to the type of syntax highlighting to apply.
Additionally you may make use of the pre-filter and post-filter pseudo-headers which allow you to transform the entry in further creative
fashions.
For example you might wish the blog to be upper-case only for some reason, and this could be achieved via:
Subject: I DONT LIKE LOWER CASE
Tags: meta, random, silly
Date: 25th December 2009
Pre-Filter: perl -pi -e "s/__USER__/`whoami`/g"
Post-filter: tr [a-z] [A-Z]
<p>This post, written by __USER__ will have no lower-case values.</p>
<p>Notice how my username was inserted too?</p>
You may chain arbitrarily complex filters together via the filters. Each filter should read the entry on STDIN and return the updated
content to STDOUT.
(If you wish to apply a global filter simply pass that as an argument to chronicle, or in your chroniclerc file.)
AUTHOR
Steve
--
http://www.steve.org.uk/
LICENSE
Copyright (c) 2009-2010 by Steve Kemp. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the
full text of the license.
perl v5.12.3 2011-05-03 CHRONICLE-ENTRY-FILTER(1)