Sponsored Content
Full Discussion: Read last word of nth line
Top Forums Shell Programming and Scripting Read last word of nth line Post 302468262 by gc_sw on Tuesday 2nd of November 2010 07:48:58 AM
Old 11-02-2010
thanks for all your replies Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can a shell script pull the first word (or nth word) off each line of a text file?

Greetings. I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file. I'm struggling to see how each line can be... (5 Replies)
Discussion started by: tricky
5 Replies

2. UNIX for Dummies Questions & Answers

query on how to search for a line and read 4th word from that line

Assume I have a text file as below: me con pi ind ken pras ur me con rome ind kent pras urs pintu con mys ind pan pras ki con kit ind sys My requirement, I need to search for "con rome" and if exists, then print 4th word from rome, i.e in above example, since "con rome"... (4 Replies)
Discussion started by: jaggesh
4 Replies

3. Shell Programming and Scripting

how to find third(nth) word in all line from a file

For example i'm having the below contents in a file: expr is great when you want to split a string into just two parts. The .* also makes expr good for skipping a variable number of words when you don't know how many words a string will have. But expr is lousy for getting, say, the fourth word... (2 Replies)
Discussion started by: bangarukannan
2 Replies

4. Shell Programming and Scripting

Read file from nth line to specific character

Hi, I want to read the file from nth line (where n is an integer) to until I encounter @ char. Can any one please help me how to do this? Thanks. (3 Replies)
Discussion started by: laalesh
3 Replies

5. Shell Programming and Scripting

How to read nth word from delimited text file?

Hi i am new in scripting how i can get 2 elements from first line of delimited txt file in shell scripts. AA~101010~0~AB~8000~ABC0~ BB~101011~0~BC~8000~ABC~ CC~101012~0~CD~8000~ABC0~ DD~101013~0~AB~8000~ABC~ AA~101014~0~BC~8000~ABC0~ CC~101015~0~CD~8000~ABC~ can anyone plse help?... (3 Replies)
Discussion started by: sushine11
3 Replies

6. Shell Programming and Scripting

Get the nth word of mth line in a file

Hi.. May be a simple question but I just began to write unix scripts a week ago, for sorting some huge amount of experiment data, so I got no common sense about unix scripting and really need your helps... The situation is, I want to read the nth word of mth line in a file, and then store it... (3 Replies)
Discussion started by: freezelty
3 Replies

7. Shell Programming and Scripting

Read a file from the nth line on

I have a script which reads from a job file and executed the scripts in the job file in sequence. #! /bin/ksh set -x while read line do $line.ksh if # mail the team fi done <"$file" The job file will be like abcd efgh ijkl mnop qrst This is working fine. I need to add... (2 Replies)
Discussion started by: nw2unx123
2 Replies

8. Shell Programming and Scripting

How to grep nth word in line?

my input file content is like this GEFITINIB 403 14 -4.786873 -4.786873 -1.990111 0.000000 0.000000 -1.146266 -39.955912 483 VANDETANIB 404 21 -4.754243 -4.754243 -2.554131 -0.090303 0.000000 -0.244210 -41.615502 193 VANDETANIB 405 21 -4.737541 -4.737541 -2.670195 -0.006006 0.000000 -0.285579... (4 Replies)
Discussion started by: chandu87
4 Replies

9. Shell Programming and Scripting

Read a File line by line and split into array word by word

Hi All, Hope you guys had a wonderful weekend I have a scenario where in which I have to read a file line by line and check for few words before redirecting to a file I have searched the forum but,either those answers dint work (perhaps because of my wrong under standing of how IFS... (6 Replies)
Discussion started by: Kingcobra
6 Replies

10. Post Here to Contact Site Administrators and Moderators

How to read the nth character from the line.?

I have Index Line and I tried to get the 9th character from the file and to check the character is "|" or not. Shell Scripting. Sample Index file. "91799489|K8E|188.004.A.917994892.1099R.c.01.pdf|2013|10/15/2014|002|B|C|C"... (3 Replies)
Discussion started by: pavand
3 Replies
YASR(1) 						      General Commands Manual							   YASR(1)

NAME
yasr (Yet Another Screen Reader) - is an attempt at a lightweight, portable screen reader. SYNOPSIS
yasr [ -C config file ] [ -c ] [ -s synthesizer ] [ -p synthesizer port ] [ program arg1 arg2 ... argN ] DESCRIPTION
yasr is a lightweight, portable screen reader. It works by opening a shell in a pty and intercepting all user input/output, maintaining a window of what should be on the screen by looking at the codes and text sent to the screen. It only requires that the user be able to access the text to speech (TTS) device. yasr was originally designed in conjunction with a Speak-out TTS device. Yasr also attempts to support DEC-Talk, DoubleTalk, Apollo, and ViaVoice Outloud, but more work is needed to get these to work fully. It may be able to work with Emacspeak servers, however. Currently yasr has two sets of keymaps, one for "review mode" (ie, reviewing the screen) and one for the standard mode. Keys defined for the standard mode are checked irrespective of whether the user is in review mode or standard mode, but the review mode keymap is checked first in the former case. OPTIONS
-C config file The configuration file that yasr should use. -c Attempts to emulate bash's -c command. It runs /bin/sh, passing it the arguments that were passed to yasr. -s synthesizer The TTS synthesizer to use in conjunction with yasr. -p synthesizer port The port that the TTS synthesizer is connected to. yasr will also fork and exec a program to run, if it (and any optional command line arguments it needs) are given as the last command line arguments. KEYBOARD SETTINGS
Review mode spacebar Say review cursor position. ^ Move to the first character on the line, and say word. $ Move to the last character on the line, and say word. b Say previous character. c Say character. d Say next character. e Read from cursor to bottom of screen. f Search for text on the screen. < Search from cursor to top of screen, using the previously-entered search string. > Search from cursor to bottom of screen, using the previously-entered search string. k Move up a line and read the line (currently same as up arrow). l Say current line. m Move down a line and read the line (currently same as down arrow). n Bypass (send directly to the application). t Read from top to cursor. w Read entire screen. z Move to beginning of previous word and read the word. x Move to beginning of next word and read the word. up arrow Move to previous line and read the line. down arrow Move to next line and read the line. left arrow Move back one character and read the character. right arrow Move ahead one character and read the character. ( Go to previous paragraph. ) Go to next paragraph. alt-i Reinitialize the synthesizer. ` Read the ASCII value of the current character. Standard mode These keys also work in review mode. ctrl-a Say application cursor position. ctrl-l Say line. ctrl-n Bypass. ctrl-x Flush speech buffer. alt-b Say previous character. alt-c Say chracter. alt-d Say word. alt-e Read cursor to bottom of screen. alt-k Say previous line. alt-l Read line. alt-m Read next line. alt-r Toggle review mode. alt-t Read top to cursor. alt-w Read entire screen. alt-x Silence speech. Like ctrl-x but will continue to be silent until a key is pressed (pressing alt-x a second time will start speech again, for example). ctrl-alt-k Keyboard wizard. Allows the user to move, copy, or delete keybindings from within yasr. ctrl-alt-o Options menu. Allows the user to set options from within yasr. ctrl-alt-s Save configuration to disk. alt-enter Disable yasr. Yasr is silent and ignores all keys when disabled. Press again to re-enable. Note: this key is defined in the [options] section as "DisableKey" FILES
/usr/local/share/yasr/yasr.conf yasr configuration file. AUTHOR
Michael P. Gorse <mgorse@users.sourceforge.net> 16 August 2002 YASR(1)
All times are GMT -4. The time now is 04:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy