Sponsored Content
Top Forums Shell Programming and Scripting Modify a perl line to parse out and output to another format Post 302650229 by richsark on Saturday 2nd of June 2012 12:48:49 AM
Old 06-02-2012
Cool. I did not know ? Was a sequence. I guess you learn something new every other day.

Thanks, I will it and revert.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl: Search for string then parse next line

Hi All, I have a file that I need to be able to find a pattern match on one line then parse data on the next or subsequent lines - I will know which line needs to be parsed beforehand. This is what I currently have: while (<COMMAND_OUT>) { if ($_ =~ m/TEST/) { ... (4 Replies)
Discussion started by: pondlife
4 Replies

2. Shell Programming and Scripting

Format a line for output

Hi all I have a problem which requires me to produce a line output in a specified format. I have looked around and see that there is typeset which would do the trick to pad a variable and as such ensure that its start position in a line is always the same. I have tried to use this, however it... (4 Replies)
Discussion started by: jhansrod
4 Replies

3. 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

4. Shell Programming and Scripting

perl parse line

Dear all anyone willling to help me..i have try so many time but still failed to get the ip address for line when i print the line is like below Connected to 192.168.1.13 #!/usr/local/bin/perl foreach $line(@lines){ if ($line =~ /connected to/) { $line=~/connected to(.*?) /; ... (2 Replies)
Discussion started by: netxus
2 Replies

5. Shell Programming and Scripting

Perl Parse word from command output

Hello, I used the following script to conect to cisco router: #!/usr/bin/perl use strict; use warnings; use Getopt::Long; use Opsware::NAS::Connect; my($host, $port, $user, $pass) = ('localhost','$tc_proxy_telnet_port$','$tc_user_username$','$tc_user_password$'); my $device =... (5 Replies)
Discussion started by: ahmed_zaher
5 Replies

6. Shell Programming and Scripting

Perl script to parse output and print it comma separated

I need to arrange output of SQL query into a comma separated format and I'm struggling with processing the output... The output is something like this: <Attribute1 name><x amount of white spaces><Atribute value> <Attribute2 name><x amount of white spaces><Atribute value> <Attribute3... (2 Replies)
Discussion started by: Juha
2 Replies

7. Shell Programming and Scripting

parse output line using bash

hi, i have the followiing scenario where by i am parsing teh following output using cut -d like so #!/bin/bash output="ABCTable| ------------------| | ------------------| code | name | amount |" col1= $output | cut -d'|' -f5 col2= $output | cut -d'|'... (1 Reply)
Discussion started by: nano2
1 Replies

8. Shell Programming and Scripting

modify ls -l (long listing format output) strictly using SED only straightforward goalhard 4 me doh

Below is a sample out of ls -l which I would like to rearrange or modify by field numbers for example I successfully managed to disect using simple paragraph however for ls -l I can't divide the rows or fields by field number. Successful modification by fields using SED sample: $ sed -e... (1 Reply)
Discussion started by: wolf@=NK
1 Replies

9. Solaris

Grant unprivileged user rights to see the output of echo|format but not modify disks

anyone have any idea how do to this with auth_attr? I suspect if I grant him solaris.device.:RO::Device Allocation::help=DevAllocHeader.html that will work but I'm unsure. Just looking for a second opinion. (10 Replies)
Discussion started by: os2mac
10 Replies

10. Shell Programming and Scripting

How to parse this file using awk and output in CSV format?

My source file looks like this: Cust-Number = "101" Cust-Name="Joe" Cust-Town="London" Cust-hobby="tennis" Cust-purchase="200" Cust-Number = "102" Cust-Name="Mary" Cust-Town="Newyork" Cust-hobby="reading" Cust-purchase="125" Now I want to parse this file (leaving out hobby) and... (10 Replies)
Discussion started by: Balav
10 Replies
GIT-REVERT(1)							    Git Manual							     GIT-REVERT(1)

NAME
git-revert - Revert an existing commit SYNOPSIS
git revert [--edit | --no-edit] [-n] [-m parent-number] [-s] <commit> DESCRIPTION
Given one existing commit, revert the change the patch introduces, and record a new commit that records it. This requires your working tree to be clean (no modifications from the HEAD commit). Note: git revert is used to record a new commit to reverse the effect of an earlier commit (often a faulty one). If you want to throw away all uncommitted changes in your working directory, you should see git-reset(1), particularly the --hard option. If you want to extract specific files as they were in another commit, you should see git-checkout(1), specifically the git checkout <commit> -- <filename> syntax. Take care with these alternatives as both will discard uncommitted changes in your working directory. OPTIONS
<commit> Commit to revert. For a more complete list of ways to spell commit names, see "SPECIFYING REVISIONS" section in git-rev-parse(1). -e, --edit With this option, git revert will let you edit the commit message prior to committing the revert. This is the default if you run the command from a terminal. -m parent-number, --mainline parent-number Usually you cannot revert a merge because you do not know which side of the merge should be considered the mainline. This option specifies the parent number (starting from 1) of the mainline and allows revert to reverse the change relative to the specified parent. Reverting a merge commit declares that you will never want the tree changes brought in by the merge. As a result, later merges will only bring in tree changes introduced by commits that are not ancestors of the previously reverted merge. This may or may not be what you want. See the revert-a-faulty-merge How-To[1] for more details. --no-edit With this option, git revert will not start the commit message editor. -n, --no-commit Usually the command automatically creates a commit with a commit log message stating which commit was reverted. This flag applies the change necessary to revert the named commit to your working tree and the index, but does not make the commit. In addition, when this option is used, your index does not have to match the HEAD commit. The revert is done against the beginning state of your index. This is useful when reverting more than one commits' effect to your index in a row. -s, --signoff Add Signed-off-by line at the end of the commit message. AUTHOR
Written by Junio C Hamano <gitster@pobox.com[2]> DOCUMENTATION
Documentation by Junio C Hamano and the git-list <git@vger.kernel.org[3]>. GIT
Part of the git(1) suite NOTES
1. revert-a-faulty-merge How-To file:///usr/share/doc/git-doc/howto/revert-a-faulty-merge.txt 2. gitster@pobox.com mailto:gitster@pobox.com 3. git@vger.kernel.org mailto:git@vger.kernel.org Git 1.7.1 07/05/2010 GIT-REVERT(1)
All times are GMT -4. The time now is 10:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy