Sponsored Content
Top Forums Shell Programming and Scripting Print out just a word from the file Post 62844 by vgersh99 on Sunday 20th of February 2005 10:40:11 PM
Old 02-20-2005
or slightly better:
Code:
sed -ne '/^[ ]*Final rating/s#^[^=][^=]*=[ ][ ]*\([^ ][^ ]*\).*#\1#p' file


Last edited by vgersh99; 02-21-2005 at 01:53 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding word in file then print the preceding....

Hi, I am looking for a way to find a particular word in a file then print a line that precedes this line, as well as this line. Sometimes in a log file there is only one word per line and I need to print one of the lines leading up to the single worded line. Example - I can grep for ouch... (5 Replies)
Discussion started by: g_jumpin
5 Replies

2. Shell Programming and Scripting

search a word in a xml file and print the out put

hi , i m having a html file and this file looks like this <ssl> <name>PIA</name> <enabled>true</enabled> <listen-port>39370</listen-port> </ssl> <log> <name>PIA</name> </log> <execute-queue> <name>weblogic.kernel.Default</name> ... (7 Replies)
Discussion started by: becksram123
7 Replies

3. Shell Programming and Scripting

How to find and print the last word of each line from a text file

Can any one help us in finding the the last word of each line from a text file and print it. eg: 1st --> aaa bbbb cccc dddd eeee ffff ee 2nd --> aab ered er fdf ere ww ww f the o/p should be a below. ee f (1 Reply)
Discussion started by: naveen_sangam
1 Replies

4. Shell Programming and Scripting

print lines from a file containing key word

i have a file containing over 1 million records,and i want to print about 300,000 line containing a some specific words. file has content. eg 1,rrt,234 3,fgt,678 4,crf,456 5,cde,drt 6,cfg,123 and i want to print the line with the word fgt,crf this is just an example,my file is so... (2 Replies)
Discussion started by: tomjones
2 Replies

5. UNIX for Dummies Questions & Answers

Script to search for a particular word in files and print the word and path name

Hi, i am new to unix shell scripting and i need a script which would search for a particular word in all the files present in a directory. The output should have the word and file path name. For example: "word" "path name". Thanks for the reply in adv,:) (3 Replies)
Discussion started by: virtual_45
3 Replies

6. UNIX for Dummies Questions & Answers

How to print the specific word in a file.

Hi , My input file is below like that :- $cat abc.txt Service name: test_taf Service is enabled Server pool: test_tac Cardinality: 2 Disconnect: false Service role: PRIMARY Management policy: AUTOMATIC DTP transaction: false AQ HA notifications: true Failover type: SESSION... (3 Replies)
Discussion started by: sp001
3 Replies

7. Shell Programming and Scripting

perl lwp find word and print next word :)

hi all, I'm new there, I'm just playing with perl and lwp and I just successfully created a script for log in to a web site with post. I have a response but I would like to have something like this: I have in my response lines like: <div class="sender">mimi020</div> <some html code.....>... (3 Replies)
Discussion started by: vogueestylee
3 Replies

8. UNIX for Advanced & Expert Users

Find 2 occurrences of a word and print file names

I was thinking something like this but it always gets rid of the file location. grep -roh base. | wc -l find . -type f -exec grep -o base {} \; | wc -l Would this be a job for awk? Would I need to store the file locations in an array? (3 Replies)
Discussion started by: cokedude
3 Replies

9. Shell Programming and Scripting

Extract the word from the file and print it

I have a file which I am reading and then I need to extract a particualr word and if it matches the line. 2015-01-22 07:30:17,814000 +0900 /INFO: - <ns2:virtualServerid="PH11PK" /> Means if the line contain Virtual server I need to extract the id . Code I wrote#!/usr/bin/perl ... (19 Replies)
Discussion started by: karan8810
19 Replies

10. Shell Programming and Scripting

Search for a specific word and print only the word from the input file

Hi, I have a sample file as shown below, I am looking for sed or any command which prints the complete word only from the input file. Ex: $ cat "sample.log" I am searching for a word which is present in this file We can do a pattern search using grep but I need to cut only the word which... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies
PYTONECTL(1)						      General Commands Manual						      PYTONECTL(1)

NAME
pytonectl - remote control for pytone SYNOPSIS
pytonectl [option] command DESCRIPTION
pytonectl is a commandline remote control for a running PyTone instance. It communicates via Unix Sockets or TCP/IP with the running PyTone. OPTIONS
-h, --help shows this help -s, --server <hostname> connects to PyTone instance on <hostname> -p, --port <port> connect to PyTone Server on given <port> -f, --file <file> connect to PyTone UNIX socket <file> COMMANDS
getplayerinfo show information on the song currently being played playerforward play the next song in the playlist playerpause pause the player playerstart start/unpause the player playertogglepause pause the player, if playing, or play, if paused playerstop stop the player playerratecurrentsong <rating> rate the song currently being played (1<=rating<=5) playlistaddsongs <filenames> add files to end of playlist playlistaddsongtop <filename> play file immediately playlistclear clear the playlist playlistdeleteplayedsongs remove all played songs from the playlist playlistreplay mark all songs in the playlist as unplayed playlistshuffle shuffle the playlist SEE ALSO
The full documentation for PyTone AUTHOR
PyTone was written by Jorg Lehmann <joerg@luga.de>. This manpage was written by Alexander Wirt <formorer@debian.org> for the Debian Distri- bution. pytone 2.0.7 Jan 2004 PYTONECTL(1)
All times are GMT -4. The time now is 11:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy