Sponsored Content
Top Forums Shell Programming and Scripting Get the positional value from first line of the file Post 302304358 by praka on Monday 6th of April 2009 08:51:06 AM
Old 04-06-2009
MySQL Get the positional value from first line of the file

Hi,

I have one flat file with delimited field as pipe(|) symbol. The file contains header,detail lines. Header is the first line in the file.

I want to read the value for the position from 15 to 18 in first line of the file.

Pls help me to get the value from position 15 to 18 in first(header) line of the file.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Positional Parameters

HPUX11.0/Korn Shell I have an old script that takes in a series of arguments when its called. The script is really more of a common set of functions that gets called by other scripts as needed. I have been asked to make this into a menu driven script to rollout to app support for their use during... (2 Replies)
Discussion started by: google
2 Replies

2. UNIX for Dummies Questions & Answers

Positional Parameters

Hello, I am using the Bourne shell. I am trying to understand the concept of positional parameters. I do understand that positional parameters: 1. Are initialized by shell 2. Have a max of 9 parameters ($1 to $9) 3. Have no limit on the number of arguments 4. Can be rearranged... (15 Replies)
Discussion started by: ericelysia
15 Replies

3. UNIX for Dummies Questions & Answers

Positional parameters

I need to get file names from commandline arguments, it may be any no of arguements, Using for loop i got but how do i display it, bcoz $i will give the number i is assigned $$i is not working either $($i), i need the names of the files got in the arguement (2 Replies)
Discussion started by: shalu@ibm
2 Replies

4. AIX

ls positional parameter

Hi . I am new to Unix. So i have a tough time. we are using Korn Shell. I have a scenario where i have three files namely xxx01,xxx02,xxx03. Now when i write ls xxx*|wc -l output is 3. But then i write `ls $1|wc -l` and pass xxx* as positional parameter (sh yyy.sh xxx*) output is xxx01. other... (1 Reply)
Discussion started by: vasuarjula
1 Replies

5. Shell Programming and Scripting

ls positional parameter

Hi . I am new to Unix. So i have a tough time. we are using Korn Shell. I have a scenario where i have three files namely xxx01,xxx02,xxx03. Now when i write ls xxx*|wc -l output is 3. But then i write `ls $1|wc -l` and pass xxx* as positional parameter (sh yyy.sh xxx*) output is xxx01. other... (1 Reply)
Discussion started by: vasuarjula
1 Replies

6. Shell Programming and Scripting

Split positional flat file.

Hi, I need to split positional flat file, based on value at position 43-45.( in red "410") Example: 12345678907886421689 200920184820410200920020092002007 12345678907886421689 200920184820411200920020092002007 12345678907886421689 200920184820411200920020092002007... (6 Replies)
Discussion started by: meetmedude
6 Replies

7. UNIX for Dummies Questions & Answers

Positional Parameters

Can someone tell me in more layman's terms what positional parameters are and give a good example? My book again is confusing me. :confused: (1 Reply)
Discussion started by: Straitsfan
1 Replies

8. UNIX for Dummies Questions & Answers

Remove lines in a positional file based on string value

Gurus, I am relatively new to Unix scripting and am struck with a problem in my script. I have positional input file which has a FLAG indicator in at position 11 in every record of the file. If the Flag has value =Y, then the record from the input needs to be written to a new file.However if... (3 Replies)
Discussion started by: gsam
3 Replies

9. Shell Programming and Scripting

Positional Update of XML File

Hello, I have a XML file and need to update the data for a specific XML Attribute in the file. I need a Perl or Awk command to look for <INTERCHANGE_CONTROL_NO>000000601</INTERCHANGE_CONTROL_NO> in the XML file and change the first two 0 of the value to 9. For instance ... (4 Replies)
Discussion started by: Praveenkulkarni
4 Replies

10. Shell Programming and Scripting

Parsing a file based on positional constraints

I have a list file1 like dog cow fox cat fish duck crowI want to classify the elements of file1 based on constrains applied on file2. Additionally the number of elements (words) in the each line of file2 is not fixed. This is my file2 cow cat fox dog cow fox dog fish crow fox dog cat ... (5 Replies)
Discussion started by: sammy777
5 Replies
curs_deleteln(3)					     Library Functions Manual						  curs_deleteln(3)

NAME
curs_deleteln, deleteln, wdeleteln, insdelln, winsdelln, insertln, winsertln - Delete or insert lines in a Curses window SYNOPSIS
#include <curses.h> int deleteln( void ); int wdeleteln( WINDOW *win ); int insdelln( int n ); int winsdelln( WINDOW *win, int n ); int insertln( void ); int winsertln( WINDOW *win ); LIBRARY
Curses Library (libcurses) STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: deleteln, wdeleteln, insdelln, winsdelln, insertln, winsertln: XCURSES4.2 Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The deleteln and wdeleteln routines do the following: Delete the line under the cursor in the current or specified window Move all lines below the current line up one line Clear the bottom line of the window These routines do not change the cursor position. (This does not imply use of a hardware delete line feature.) The insdelln and winsdelln routines do the following: For positive n, insert n lines into the current or specified window above the current line The n bottom lines are lost. For negative n, delete n lines (starting with the one under the cursor), and move the remaining lines up The bottom n lines are cleared. These routines do not change the current cursor position. The insertln and insertln routines insert a blank line above the current line. The bottom line is lost. (This does not imply use of a hard- ware insert line feature.) NOTES
The header file <curses.h> automatically includes the header file <stdio.h>. Note that all routines except winsdelln may be macros. RETURN VALUES
All routines return ERR upon failure and OK upon successful completion. SEE ALSO
Functions: curses(3) Others: standards(5) curs_deleteln(3)
All times are GMT -4. The time now is 11:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy