Sponsored Content
Top Forums Shell Programming and Scripting How to extract previous value Post 302502449 by bartus11 on Tuesday 8th of March 2011 03:08:21 AM
Old 03-08-2011
Quote:
Originally Posted by dinjo_jo
This seems the best solution

Code:
awk '$1=="State" && $3!~"0x0000"{print x}{x=$3}'

anyone knows what does 1 stands for ?

awk '$1=="State" && $3!~"0x0000"{print x}{x=$3}1'
But there is no "1" at the end of my code...
 

10 More Discussions You Might Find Interesting

1. HP-UX

Previous command

Hi, i would like to retrieve (only retrieve, not execute) a previous command which i executed on the command prompt. I tried the 'up arrow' key, but its not working. Instead,it showed me some funny characters. I searched around and i found the way to do it was using the way below. Several... (5 Replies)
Discussion started by: new2ss
5 Replies

2. Forum Support Area for Unregistered Users & Account Problems

previous posts

Hi, is there a way I can display my previous question posted? I've had a look around but couldn't find anything. Thanks in advance, Simon. (2 Replies)
Discussion started by: james6
2 Replies

3. Shell Programming and Scripting

How to get previous date

Hello, Apologies for not following the forum rules. I will follow it from now on. What I need now is to get the previous date in PERL. Today is 07/01/2010...and the prev date is 06/30/2010. Could you please show me the (localtime) syntax of how to write this so it works in all... (3 Replies)
Discussion started by: nurani
3 Replies

4. Shell Programming and Scripting

To get the previous 5 minutes

Hi I need to get the previous 5 minutes from the currnet time as given below. Please help. Current time : date +%d-%m-%Y_%H-%M output : 16-05-2012_15-05 I need the previous 5 minutes of the above output , Required output: 16-05-2012_15-04 16-05-2012_15-03... (4 Replies)
Discussion started by: Kanchana
4 Replies

5. Shell Programming and Scripting

Search for a pattern,extract value(s) from next line, extract lines having those extracted value(s)

I have hundreds of files to process. In each file I need to look for a pattern then extract value(s) from next line and then search for value(s) selected from point (2) in the same file at a specific position. HEADER ELECTRON TRANSPORT 18-MAR-98 1A7V TITLE CYTOCHROME... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies

6. Shell Programming and Scripting

Remove previous line if next & previous lines have same 4th character.

I want to remove commands having no output. In below text file. bash-3.2$ cat abc_do_it.txt grpg10so>show trunk group all status grpg11so>show trunk group all status grpg12so>show trunk group all status GCPKNYAIGT73IMO 1440 1345 0 0 94 0 0 INSERVICE 93% 0%... (4 Replies)
Discussion started by: Raza Ali
4 Replies

7. Shell Programming and Scripting

Help with getting last date of previous month and first date of previous 4th month from current date

I have requirment to get last date of previous month and the first date of previous 4th month: Example: Current date: 20130320 (yyyymmdd) Last date of previous month: 20130228 (yyyymmdd) First date of previous 4th month: 20121101 (yyyymmdd) In my shell --date, -d, -v switches are not... (3 Replies)
Discussion started by: machomaddy
3 Replies

8. Shell Programming and Scripting

Print previous (non zero)

Dear All, I have file like this, 13819 32.07 1877.65 0 481.81 2100.86 0 789.35 2274.05 0 4627.61 4421.36 0 5831.52 4855.50 20844 38.68 1902.15 0 291.02 1945.88 0 452.57 2013.94 0 2194.28 ... (6 Replies)
Discussion started by: attila
6 Replies

9. UNIX for Dummies Questions & Answers

AIX UNIX - script on how to extract from log file with previous date

Hello, I am new to this forum so any assistance would help. I am currently trying to develop a script that extract all data from a log file with has the previous day's date. $ <root@aixtest3> /var/log > more sudo.log May 13 10:52:10 aixtest3 local2:notice sudo: tbrath : TTY=unknown ; ... (14 Replies)
Discussion started by: Kslew82
14 Replies

10. Shell Programming and Scripting

Extract row grater than 3 from previous value of a field

Hi, I am trying to extract data where first field unique value and 4th field of next row is grater than first row 4th field. input data is a below: 7035719974,20-jul-2016 07:42:51,07:42:51,074251,1 7035719974,20-jul-2016 07:43:57,07:43:57,074357,2 7399206761,20-jul-2016... (2 Replies)
Discussion started by: rramkrishnas
2 Replies
pods::SDLx::Controller::State(3pm)			User Contributed Perl Documentation			pods::SDLx::Controller::State(3pm)

NAME
SDLx::Controller::State - the state of a SDLx::Controller::Interface CATEGORY
Extension, Controller SYNOPSIS
# you'll most likely get a State object from a SDLx::Controller::Interface # object. Just in case, here's how you would construct one by hand: my $state1 = SDLx::Controller::State->new; my $state2 = SDLx::Controller::State->new( $x, $y, $v_x, $v_y, $rotation, $ang_v ); # attributes are just simple accessors: $state->x(10); $state->x; # 10 # same goes for the rest: $state->y; $state->ang_v; # etc. DESCRIPTION
A state object is a simple container for any given state inside a running SDLx::Controller::Interface instance. METHODS
new() new( $x, $y, $v_x, $v_y, $rotation, $ang_v ) Creates a new state container object. Can optionally set the initial value of all its attributes (see below). ACCESSORS
x Accessor to get/set the x value, usually used to position the item or check for collisions. y Accessor to get/set the y value, usually used to position the item or check for collisions. v_x Accessor to get/set the x velocity of the instance, for moving objects dynamically. v_y Accessor to get/set the y velocity of the instance, for moving objects dynamically. rotation Accessor to get/set the rotation of the object, in degrees (0..360). ang_v Accessor to get/set the angular velocity, for rotating objects dynamically. AUTHORS See "AUTHORS" in SDL perl v5.14.2 2012-05-28 pods::SDLx::Controller::State(3pm)
All times are GMT -4. The time now is 03:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy