Sponsored Content
Top Forums Shell Programming and Scripting check position of end of line(URGENT PLS) Post 302144619 by senthil_is on Thursday 8th of November 2007 10:56:33 PM
Old 11-08-2007
check position of end of line for some specific lines

Thankyou very much for your immediate response.

But its giving some syntax error.

this is what i used.

shouldbe=94
srcFile=$1

awk -v e=$shouldbe '{ /^(620|705)/ if(length($0) != e){print "bad line ", NR} }' $srcFile

The error is below
==============
syntax error The source line is 1.
The error context is
{ /^(620|705)/ >>> if <<< (length($0) != e){print "bad line ", NR} }
awk: The statement cannot be correctly parsed.
The source line is 1.


Can you please correct it?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check position of end of line for some specific lines

-------------------------------------------------------------------------------- Have to check in a file that the lines starting with 620 and 705 are ending at same posiotin. 82012345 62023232323 70523949558 62023255454 9999 In the above lines, i have to check the lines starting... (1 Reply)
Discussion started by: senthil_is
1 Replies

2. UNIX for Dummies Questions & Answers

URGENT :pls help

Following is d code snipet #!/bin/ksh retVal=`sqlplus -s user/passwd\@oracle_sid <<EOF SET SERVEROUTPUT ON SIZE 100000 DECLARE STATUS_VALUE VARCHAR2(1); BEGIN SELECT temp1 INTO STATUS_VALUE FROM sai; DBMS_OUTPUT.PUT_LINE(STATUS_VALUE); END; / exit; EOF` echo "Return Value... (2 Replies)
Discussion started by: sainathdeg
2 Replies

3. Shell Programming and Scripting

Urgent! Sed/Awk Filter Find Pattern Delete Till End Of Line

Hi, I need help with using an awk or sed filter on the below line ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE Look for... (2 Replies)
Discussion started by: rajan_san
2 Replies

4. UNIX for Advanced & Expert Users

Urgent Help required : awk/sed help to find pattern and delete till end of line

Hi, I need help with using an awk or sed filter on the below line ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE Look for... (1 Reply)
Discussion started by: rajan_san
1 Replies

5. UNIX for Dummies Questions & Answers

find if a position is between a given start and end position

Hi, I am a newbie in unix programming so maybe this is a simple question. I would like to know how can I make a script that outputs only the values that are not between any given start and end positions Example file1: 2 30 40 80 82 100 file2: ID1 1 ID2 35 ID3 80 ID4 81 ID6... (9 Replies)
Discussion started by: fadista
9 Replies

6. Shell Programming and Scripting

Subsitute from a position till end of line.

Hi, Having a following file's content, lets say: ABC|ANA|LDJ|||||DKD|||||| AJJ|KKDD||KKDK|||||||||||| KKD||KD|||LLLD||||LLD||||| Problem: Need to replace pipes from 8th occurrence of pipe till end. so the result should be: ABC|ANA|LDJ|||||DKD AJJ|KKDD||KKDK|||| ------- ------- ... (12 Replies)
Discussion started by: _Noprofi
12 Replies

7. Shell Programming and Scripting

pls help me very urgent

will post again (1 Reply)
Discussion started by: revertback
1 Replies

8. Shell Programming and Scripting

Remove the spaces at the end of a line starting from a fixed position

I want to remove the trailing spaces at the end of each line starting from a particular position(using ksh script). For example, in the attached file, I want to remove all the spaces starting from the position 430 till the end. The space has to be removed only from the 430th position no matter in... (3 Replies)
Discussion started by: Suryaaravindh
3 Replies

9. UNIX for Dummies Questions & Answers

Check for empty line at end of a dynamic header in each file

Hi Folks, I have a requirement to develop a shell script. PFB my requirement, Requirement: I need to check an empty line after the end of each header in respective file and if a empty line is present simply echo file OK and if empty line is not present echo "Adding empty line" and add an... (6 Replies)
Discussion started by: tpk
6 Replies

10. Shell Programming and Scripting

Shell script to check line end not ending with comma

I have several line in a text file. for example I like apple; I like apple I like orange; Output: I like apple I try to useif grep -q "!\;$"; then (Not work) Please use CODE tags when displaying sample input, sample output, and code segments (as required by forum rules). (1 Reply)
Discussion started by: cmdcmd
1 Replies
llogin(1)						      General Commands Manual							 llogin(1)

NAME
llogin - Connects to a LAT service SYNOPSIS
/usr/sbin/llogin -d | service [-p tty] [-H rem_node] [-R rem_port] [-wpassword | -W] OPTIONS
Displays a list of learned services including the node name and rating. Specifies a local LAT tty device (tty) to use to connect to ser- vice. Either SVR4 or BSD tty devices can be specified. However, the tty device must already exist and be available for use. If no tty device is specified, llogin uses any available SVR4 tty device. If no available devices are found, llogin creates an SVR4 LAT tty device for the user. When llogin exits, the created tty device is removed. Specifies a remote host (rem_node) that offers service. This is helpful when more than one host offers a service. Specifies a remote port (rem_port) that offers service. Speci- fies a password for connecting to service when the remote service has password checking enabled. The password is not case sensitive and spaces are not allowed. If you use the -w option, you specify the password on the command line; it is visible. If you use the -W option, you are prompted for the password; it is not echoed (visible). DESCRIPTION
The llogin command enables Tru64 UNIX users to connect to LAT services offered by other nodes in the local area network (LAN). You do not need superuser privileges or node information in order to connect to LAT services. If you do not know what services are known to your local node, use the llogin -d command. If you want to perform simultaneous llogin connections, use the llogin -p command. To make the llogin connection establishment quicker, add the target hostname as a remote service by using the latcp command. EXAMPLES
The following command initiates a connection to service siteapp on any node and port through any local LAT tty device: llogin siteapp The following command initiates a connection to service siteapp on any node and port through local LAT tty device 620: llogin siteapp -p 620 The following command initiates a connection to service siteapp on any remote port on host HOSTX through local LAT tty device 620: llogin siteapp -p 620 -H HOSTX The following command initiates a connection to service siteapp on remote port TTY_Z on host HOSTX through local LAT tty device 620: llogin siteapp -p 620 -H HOSTX -R TTY_Z SEE ALSO
Commands: latcp(8) Network Information: lat_intro(7) llogin(1)
All times are GMT -4. The time now is 03:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy