Sponsored Content
Top Forums Shell Programming and Scripting Pic a value from a line at runtime Post 302828265 by RavinderSingh13 on Tuesday 2nd of July 2013 06:21:02 AM
Old 07-02-2013
Quote:

Pic a value from a line at runtime


Code:
BIP in report_one_acnt> **SUCCESSFUL** BILL 25895519 ACCOUNT 7615

hi i have a line above.. i need to pick the value 25895519 at runtime.

this number can be of different length but the number will always appear in this this line. and between the words BILL and ACCOUNT

**SUCCESSFUL** this is also constant in the line.

how can i pick this value and store in a variable

Hello,

This solution will help you i case the field/column number is fix for the Digits required by you. Also lets say your data is stored in test11 file.

Code:
 
$ cat test11
BIP in report_one_acnt> **SUCCESSFUL** BILL 25895519 ACCOUNT 7615

$ awk '{print$6}' test11
25895519
$


Please let us knnow if we can help further on same.



Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting Function Name At Runtime

Hi, Suppose I have a User define function get_abc in which I am using $0 to get the name of function. But when I call that function in any script, $0 will give the script name, not the function name. For example: Function: get_abc ------------------- get_abc( ){ echo $0 } Script:... (3 Replies)
Discussion started by: yeheyaansari
3 Replies

2. UNIX for Dummies Questions & Answers

Runtime Error...

My system did stay appears the error Run Time Library Error. What itīs? When the error appear, iīve to reboot my system and lost all I did. Is there the UNIX System problem? Please. I need help!!! (4 Replies)
Discussion started by: marpin
4 Replies

3. Forum Support Area for Unregistered Users & Account Problems

where did you get your profile pic?

I like it! (1 Reply)
Discussion started by: jgentile
1 Replies

4. Solaris

SunFire v245 Environmental PIC micro controller fix

Hello All, We have a v245 that powered itself off for no reason. Searching around we discovered there is a bug were a temp error is being reported but doesnt actually exist, SUN released an EPIC update, the README is shown below but even after upgrading the ALOM to the latest v1.6.10 we do not... (8 Replies)
Discussion started by: Wez
8 Replies

5. Shell Programming and Scripting

writing in a file's particular column number of every line during runtime

Given a particular line number and a corresponding column number, can i write something in the file during run time? For example x=1 and during runtime i want to write the value of x in column 100 of every line of a given file, then how shud that be done? Thanks (9 Replies)
Discussion started by: arindamlive
9 Replies

6. Ubuntu

setting pic folder for wallpapers

Hi, If I have folder with many pics, and I would like to use that folder for my desktop. But I don't want a specific pic, I want to replace every set of time the pic from the pics in that folder. How can I do that? In ubuntu of course. (0 Replies)
Discussion started by: programAngel
0 Replies

7. Shell Programming and Scripting

Runtime input

Hi all.. I have a command for example /abc/def/ghi.jkl Filename filename1. If I run this command, it will ask for y/N which I have to type manually. Now Im trying to automate it using shell script and input the y option. Please help me on doing this. Thanks in advance. ... (7 Replies)
Discussion started by: Sathya83aa
7 Replies

8. Debian

After saving a pic, gimp should not be launched

Hi, i use a crunchbang-LINUX . The Problem: When i download and save a picture, the system automaticaly launches gimp. i tried to find a config file, were i can switch of this "gimp-start," but unfortunatelly i didnt find it. cat /etc/X11/default-display-manager /usr/bin/slim I'm also not... (2 Replies)
Discussion started by: IMPe
2 Replies

9. Shell Programming and Scripting

Wget help - unable to download pic

There is a website providing traffic camera images that gets updated every few minutes. My aim is to download the images over time to get a view of traffic conditions through the day. Website: CHECKPOINT.SG Image link, as taken from site source: http://www.checkpoint.sg/sg/2701 I tried... (2 Replies)
Discussion started by: Leion
2 Replies
AIRSTRIKE(6)							       GAMES							      AIRSTRIKE(6)

	    _	 _	    _	     _ _
	   / 	(_)_ __ ___| |_ _ __(_) | _____
	  / _  | | '__/ __| __| '__| | |/ / _ 
	 / ___ | | |  \__  |_| |  | |   <  __/
	/_/   \_\_|_|  |___/\__|_|  |_|_|\_\___|

NAME
airstrike - 2d dogfight game in the tradition of 'Biplanes' and 'BIP' DESCRIPTION
Airstrike is a 2d biplane dogfight game in the tradition of the Intellivision and Amiga games 'Biplanes' and 'BIP'. It features a robust physics engine and several other extensions of the original games. SYNOPSIS
airstrike [options] OPTIONS
Airstrike reads all the configuration options from a configuration file at startup but you can override from command line a few of the options: --fullscreen Runs the game in fullscreen mode. --sound Runs game with sound effects, if support for that has been compiled in. --nosound Runs the game without sound. --noalpha Game graphics will not be antialiased. This makes it run faster. --alpha Game graphics will be antialiased. --config CONFIGFILE Use given configuration file instead of the one which location is compiled into Airstrike. Configuration file name is '.airstrikerc' and it's located in your home directory. CONTROLS
Airstrike is controlled from keyboard: RIGHT Plane nose goes up. LEFT Plane nose goes down. COMMA Accelerate. DOT Shoot. SPACE Drop a bomb. ESC Pause game and open game options menu. From menu you can change options, view release notes and quit it. LICENCE
This is free software; you can redistribute it and/or modify it under the terms specified in the GNU Public Licence (GPL). WARRANTY
None. COPYRIGHT AND CREDITS
Ulf Ekstrom Game author, programming and graphics Peter Eismann Windows port, comments and ideas Eero Tamminen Sound, graphics, game objects, makefiles, comments and ideas Alessandro Giusti Graphics and ideas And many others for comments, bug reports and ideas. Airstrike Version 1.0 AIRSTRIKE(6)
All times are GMT -4. The time now is 07:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy