Sponsored Content
Full Discussion: Assistance in Perl scripting
Top Forums Shell Programming and Scripting Assistance in Perl scripting Post 302352443 by deo_kaustubh on Friday 11th of September 2009 10:01:22 AM
Old 09-11-2009
Assistance in Perl scripting

PFA file "color.txt".
Note : There is no newline character in the file. I have manually inserted the newline char to make it easy to understand.

I am expecting out in the form as specified in second file "out.txt"

I need a perl script to perform the task.

Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Assistance with Perl and HTTP

I need to query a http site and then parse the xml results, this works well if I use the string in IE but I require an automated solution. I have tried using the following as well as HTTP::Request, nothing seems to work any suggestions would be appreciated, I have tried diffrnt things I found on... (7 Replies)
Discussion started by: bryanthomas
7 Replies

2. Shell Programming and Scripting

In need of multi threaded perl assistance

I need to write a perl script to execute external programs and grab the output and return code. Each program should be killed if it has not completed within X seconds. Imagine that the script goes something like this : @commands = &get_commands(); foreach $cmd (@commands) { $pid =... (4 Replies)
Discussion started by: SandmanCL
4 Replies

3. Shell Programming and Scripting

Assistance needed with perl script

Ok, theres a log file containing the below. Lets call the logfile log_fantastic: 2009/03/16 21:42:45 USER: tonnabo - MAC: 0014BF2D385A - STATUS_ID: 30 - STATE: ERROR 2009/03/16 21:42:45 USER: tonnabo - MAC: 001310AC120D - STATUS_ID: 15 - STATE: OK 2009/03/16 21:42:45 USER: tonnabo - MAC:... (5 Replies)
Discussion started by: SkySmart
5 Replies

4. Shell Programming and Scripting

Scripting neophyte needs file manipulation assistance

I need to write two shell scripts for an rsync backup solution. The first script will copy all backed up files into a folder named after the original folder, plus a date stamp (so e.g. if the original folder name is 'foo' and is backed up on the 10th of September, then the backup folder will be... (0 Replies)
Discussion started by: LambdaCalculus
0 Replies

5. Shell Programming and Scripting

awk, sed, perl assistance in outputting formatted file

Hello, Please advise. Scoured this site, as well as google for answers. However if you do not know what to search for, it's a bit hard to find answers. INPUT: ACTASS= 802 BASECOS= 279 COSNCHG= 3 CUSCOS= 52 UPLDCOS= 2 DESIRED OUTPUT: ACTASS=802 BASECOS=279 (13 Replies)
Discussion started by: abacus
13 Replies

6. Shell Programming and Scripting

Using ii for irc chat - scripting assistance?

I am using ii for irc on my pogoplug... hxxp://hg.suckless.org/ii/file/d163c8917af7/FAQ If you look at the bottom of there, it states 31 What other fancy stuff can I do with ii? 32 ---------------------------------------- 33 It is very easy to write irc bots in ii: 34... (3 Replies)
Discussion started by: spartan2006
3 Replies

7. Shell Programming and Scripting

sed newbie scripting assistance

Howdy folks, I'm trying to craft a log file summarisation tool for an application that creates a lot of duplicate entries with only a different suffix to indicate point of execution. I thought I'd gotten close but I'm clearly missing something. Here's a genericized version: A text_file... (3 Replies)
Discussion started by: mthespian
3 Replies

8. Shell Programming and Scripting

Dhcp.config file scripting assistance

Hello everyone! I am brand new at this forum thing and wanted to thank all of you for your time and help in advance for helping me troubleshoot my issue. I am fairly new to shell scripting and scoured the entire internet to find a solution for my issue to no avail and hope you're able to help. ... (2 Replies)
Discussion started by: sedrocks
2 Replies

9. Shell Programming and Scripting

Noob to scripting needs some assistance

Hello, I am in a Unix class and have been out of town. I have been tasked to generate a couple of scripts and ahve never done it before. I have a virtual machine running Ubuntu. The task is below Prompt the system administrator for all valid input parameters Generate a menu to ask which... (1 Reply)
Discussion started by: jkeeton81
1 Replies

10. Shell Programming and Scripting

Assistance on complicated perl script

As a followup to my previous thread, I'm trying to make a complicated perl script that involves storing information from a text file into a hash, and giving the user the ability to change the information present/write the information currently inside the hash to a new file. This is the code I've... (8 Replies)
Discussion started by: Eric1
8 Replies
SHTOOL-MDATE.TMP(1)					      GNU Portable Shell Tool					       SHTOOL-MDATE.TMP(1)

NAME
shtool-mdate - GNU shtool pretty-print last modification time SYNOPSIS
shtool mdate [-n|--newline] [-z|--zero] [-s|--shorten] [-d|--digits] [-f|--field-sep str] [-o|--order spec] path DESCRIPTION
This command pretty-prints the last modification time of a given file or directory path, while still allowing one to specify the format of the date to display. OPTIONS
The following command line options are available. -n, --newline By default, output is written to stdout followed by a "newline" (ASCII character 0x0a). If option -n is used, this newline character is omitted. -z, --zero Pads numeric day and numeric month with a leading zero. Default is to have variable width. -s, --shorten Shortens the name of the month to a english three character abbreviation. Default is full english name. This option is silently ignored when combined with -d. -d, --digits Use digits for month. Default is to use a english name. -f, --field-sep str Field separator string between the day month year tripple. Default is a single space character. -o, --order spec Specifies order of the day month year elements within the tripple. Each element represented as a single character out of ``"d"'', ``"m"'' and ``"y"''. The default for spec is ``"dmy"''. EXAMPLE
# shell script shtool mdate -n / shtool mdate -f '/' -z -d -o ymd foo.txt shtool mdate -f '-' -s foo.txt HISTORY
The GNU shtool mdate command was originally written by Ulrich Drepper in 1995 and revised by Ralf S. Engelschall <rse@engelschall.com> in 1998 for inclusion into GNU shtool. SEE ALSO
shtool(1), date(1), ls(1). 18-Jul-2008 shtool 2.0.8 SHTOOL-MDATE.TMP(1)
All times are GMT -4. The time now is 09:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy