Length of each line.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Length of each line.
# 8  
Old 08-28-2008
Actually I just refactored it for unrelated reasons ("next" is easier to type five times than "print NF" and if you want to print the whole line instead it's only one place to change). The fundamental problem is that !(/^9999/ && 1) is true for files which do not match /^9999/.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

Vim line length...

The vi(m) text editor... Google is not my friend here... I have already found out that it is possible to save a pure text file without the '0x0A' newline character at the very end of the file but I can't find anything on the next question. I have written a raw audio file to quantised pure... (6 Replies)
Discussion started by: wisecracker
6 Replies

2. Programming

Maximum length of a line

How can I change the maximum length of a programming line in fortran and C (specifically in fortran 77)? Seems the default maximum length is 72 in fortran 77. Thanks. (4 Replies)
Discussion started by: hbar
4 Replies

3. Shell Programming and Scripting

Check for length which exceeds specified length in a line

Hi, I have a issue, I need to loop through a comma delimited file and check for the length which exceeds specified length , if Yes truncate the string. But my problem is , I do not have to check for all the fields and the field lenght is not same for all the fields. For ex: Say my line... (9 Replies)
Discussion started by: rashmisb
9 Replies

4. Programming

Is there a limit for a code line length in C?

Is there any stabdard limitation on size of a code line in C code? I am interesting in UNIX limitation, particulary on SUN. Thanks! (8 Replies)
Discussion started by: alex_5161
8 Replies

5. Shell Programming and Scripting

Count line Length

I am trying to write a shell scrip that can give me the line length of a record that was in EBDIC and then converted to ASCII. Everything I try reports 1 yet the length is 2000+. I have tried echo "Line length : ${#FILE}" echo "FILE" |awk -F, '{print NF}' awk '{lenth(file)}' All I can... (11 Replies)
Discussion started by: wbshrk
11 Replies

6. Shell Programming and Scripting

Parse a line which has different word length

Hi All, Please let me know a command to parse the below line and find the words, I have a line like this 40609 39930 In this above line the two words are separted by space.The length of this two words may differ. I want to put 40609 in var_one and 39930 in var_two. Eg. Input line is ... (1 Reply)
Discussion started by: girish.raos
1 Replies

7. Shell Programming and Scripting

separate file by line length

hi all, i'm new in unix.... i have question, sorry if it's missplace or too silly let say i have a file name testfile.log that contains data 000001 000002 000003 aaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbb cccccccccccccc dddddddddddddddddd 000004 i want to make new file... (3 Replies)
Discussion started by: venven
3 Replies

8. Shell Programming and Scripting

Deleting Characters at specific position in a line if the line is certain length

I've got a file that would have lines similar to: 12345678 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 23456781 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 34567812 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 45678123 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 xx.00... (10 Replies)
Discussion started by: Cailet
10 Replies

9. Shell Programming and Scripting

line length

hi In my script i am having echoes which have very lage output. echo $final sample output: etc... The output gets printed continuosly. Is there any way by which I can put a line break after every 25 positions? In nutshell , I need a neat output of my BIG echo as below: (4 Replies)
Discussion started by: Sreejith_VK
4 Replies

10. Shell Programming and Scripting

grep line length limit

Hi Friends, I am having a funny problem with grep. When I run grep 'expr' file.txt things work fine. But when try to get the line number using the -n option, i.e, grep -n 'expr' file.txt I get a message, "grep: 0652-226 Maximum line length of 2048 exceeded." If the line has more than... (3 Replies)
Discussion started by: hnhegde
3 Replies
Login or Register to Ask a Question
PQLIST(1)							      pqlist								 PQLIST(1)

NAME
pqlist - List available NetWare print queues SYNOPSIS
pqlist [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -C ] [ pattern ] DESCRIPTION
pqlist lists all the NetWare print queues available to you on some server. If you are already connected to some server, this one is used. If pqlist does not print to a tty, the decorative header line is not printed, so that you can count the printing queue available on your server by doing pqlist -S server | wc -l pqlist looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more information. Please note that the access permissions of .nwclient MUST be 600, for security reasons. OPTIONS
pattern pattern is used to list only selected queues. You can use wildcards in the pattern, but you have to be careful to prevent shell inter- pretation of wildcards like '*'. -h -h is used to print out a short help text. -S server server is the name of the server you want to use. -U user name If the user name your NetWare administrator gave to you differs from your unix user-id, you should use -U to tell the server about your NetWare user name. -P password You may want to give the password required by the server on the command line. You should be careful about using passwords in scripts. -n -n should be given to mount shares which do not require a password to log in. If neither -n nor -P are given, pqlist prompts for a password. -C By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off this conversion by -C. SEE ALSO
nwclient(5), nprint(1), slist(1), ncpmount(8), ncpumount(8) CREDITS
pqlist was written by Volker Lendecke (lendecke@math.uni-goettingen.de) pqlist 01/10/1996 PQLIST(1)