Sponsored Content
Top Forums Shell Programming and Scripting Perl - need script for modify lines Post 302447196 by cola on Saturday 21st of August 2010 08:14:35 PM
Old 08-21-2010
Quote:
Originally Posted by rdcwayx
Code:
sed 's/^/ace;|;/' urfile

awk '$0="ace;|;" $0' urfile

perl -p -e  's/^/ace;|;/' urfile

Why does it get error?
Code:
 sed 's/^/ace;|;\1/' urfile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Modify Perl script to work with txt - Permissions script

Hi I have this code, and i want work with a ls -shalR output in .txt What i need read to do this?? Where start? #!/usr/bin/perl # Allrights- A perl tool for making backups of file permissions # Copyright (C) 2005 Norbert Klein <norbert@acodedb.com> # This program is free... (1 Reply)
Discussion started by: joangopan
1 Replies

2. UNIX for Dummies Questions & Answers

How to use sed modify specific lines

Could anybody tell me how I can use sed to modify lines following specific lines? the file is as following: "TEST/SI1573.lab" 3670 8920 h# 8920 9530 hh 9530 10694 ih . "TEST/DR1/FAKS0/SI2203.lab" 9730 9580 h# 9580 9840 dh 9840 10652 ix 10652 11997 r ........ I want to modify the... (5 Replies)
Discussion started by: Jenny.palmy
5 Replies

3. UNIX for Dummies Questions & Answers

Perl/shell script count the lines

Hi Guys, I want to write a perl/shell script do parse the following file input file content NPA-NXX SC 2084549 45 2084552 45 2084563 2007 2084572 45 2084580 45 3278411 45 3278430 45 3278493 530 3278507 530... (3 Replies)
Discussion started by: pistachio
3 Replies

4. Shell Programming and Scripting

[Help] PERL Script - grep multiple lines

Hi Gurus, I need some help with the "grep" command or whatever command that you think suitable for me. I'm about to write a perl script to extract a report from the system and submit it to the end users. The input for the script will consist of 3 element. 1) Generation ID 2) Month 3) Year... (6 Replies)
Discussion started by: miskin
6 Replies

5. Shell Programming and Scripting

Need help to modify perl script: Text file with line and more than 1 space

Dear Friends, I am beginner in Perl and trying to find the problem in a script. Kindly help me to modify the script. My script is not giving the output for the last field and followed text (LA: Language English). Input file & script as follows: Input file: Thu Mar 19 2:34:14 EDT 2009 STC... (3 Replies)
Discussion started by: srsahu75
3 Replies

6. Shell Programming and Scripting

Modify a perl script to find and count

Hello all !I have two sets of folders that have IP address from two sources.The below perl script I was working with needs some corrections.I am looking for the perl script to identify and count what IP address are found to be duplicated between both files.The format from both files are the same... (4 Replies)
Discussion started by: richsark
4 Replies

7. Shell Programming and Scripting

Modify Perl Script To Send Attachments

Hello, I'm a newbie to the world of programming and so i decided to take up perl. I'm trying to learn how to modify the script below in order to have it sent with attachments. Any suggestions? #!/usr/bin/perl -w use strict; use warnings; my $from = 'xxx@domain.com'; my $to =... (0 Replies)
Discussion started by: xmaverick
0 Replies

8. Shell Programming and Scripting

about the modify lines

Hello, I am trying to convert lines from text file, I got lines in text files like that ALPHA.cab tomtom.cab vgame.cab converter.cabWhat i want to do is I want to conver these lines like that, cabwiz.exe ALPHA.cab extract "C:\1extract\ALPHA" cabwiz.exe tomtom.cab extract ... (5 Replies)
Discussion started by: davidkhan
5 Replies

9. UNIX for Dummies Questions & Answers

How to modify lines without certain patterns?

I have file like this: rs111 A T 0.9 0.8 ... rs112 AT T 0.8 0.2 ... rs113 G CT 0.9 0.1... I wish to replace all the NONE "A" or "T" or "G" or "C" values in column 3 and column 4 to " ", how can I do this? thanks! (8 Replies)
Discussion started by: luoruicd
8 Replies

10. Shell Programming and Scripting

Perl script to modify csv file

Hi Friends, I want to convert a csv file into a ordinary .txt file. I am able to convert but I want the output to look as shown below in the .txt file table findhost= { {"xyz","abc"}, {"rxz","mmz"}, {"vrr","nnz"}, } default={"NONE"} My current perl script #!/usr/bin/env perl... (12 Replies)
Discussion started by: dbashyam
12 Replies
ace-of-penguins(6)						   User Commands						ace-of-penguins(6)

NAME
ace-of_penguins - Solitaire-games with penguin-look SYNOPSIS
ace-canfield ace-freecell ace-golf ace-mastermind ace-merlin ace-minesweeper ace-pegged ace-solitaire ace-spider ace-taipei ace-taipedit ace-thornq OPTIONS
None. DESCRIPTION
From the author's intro.html: "The Ace of Penguins is a set of Unix/X solitaire games based on the ones available for Windows(tm) but with a number of enhancements that make my wife like my versions better :-)" ace-canfield Solitary card-game ace-freecell Solitary card-game ace-spider Solitary card-game ace-solitaire Solitary card-game ace-thornq Solitary card-game ace-golf Another solitary card-game ace-mastermind Guess a secret combination of colors. ace-merlin Classical puzzle, rather frustrating. ace-minesweeper Find all hidden mines in a minefield. ace-pegged Classical board game. ace-taipei Asian puzzle, remove pairs of equal stones. ace-taipedit Editor for your own ace-taipei levels. KEYS
All games use the same library of functions and thus the same keys: F1 Online help. Esc Esc or "Q" to leave the game. NOTES
The upstream author DJ Delorie has written an informative webpage which is installed in /usr/share/doc/ace-of-penguins/intro.html The original binaries were renamed to include prefix ace-* to avoid name clashes. BUGS
If you encounter any bugs in this package, please report them to the Debian Bug Tracking System at http://bugs.debian.org/. ENVIRONMENT
None. FILES
None. SEE ALSO
Other games in /usr/games AUTHORS
Programs are by DJ Delorie, some by Martin Thornquist. This manual page was written 1999-09-09 by Thimo Neubauer <thimo@debian.org> for the Debian GNU system (but may be used by others). Updated 2007-09-03 by Jari Aalto <jari.aalto@cante.net>. Released under license GPL v2 or (at your option) any later version. ace-of-penguins 2012-03-23 ace-of-penguins(6)
All times are GMT -4. The time now is 05:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy