I'm trying to write a SHELL (ksh) script that'll search the file say e.g filename = /filesysname1 grouped under FSstatus and get everthing beneath FSstatus group.
If all the groups are separated by blank line you can use this
Thus, I should be able search for anygroup, i.e. lines that start with an # and everything below it until the first blank line. I also need to know the group name, i.e. either FSstatus or FSgroup
If all the groups are separated by blank line you can use this to display group with group name "FSstatus"
Hi,
Please let me know how to find text and print text and its previous line. Please don't get irritated few days back I asked text and next line. I am using HP-UX 11.11
Thanks for your help. (6 Replies)
Hello,
Can anybody help me to correct my sed syntax to find the string and print previous two lines and current line and next one line.
i am using string as "testing"
netstat -v | sed -n -e '/test/{x;2!p;g;$!N;p;D;}' -e h
i am able to get the previous line current line next line but... (1 Reply)
I'll try explain this as best I can. Let me know if it is not clear.
I have large text files that contain data as such:
143593502 09-08-20 09:02:13 xxxxxxxxxxx xxxxxxxxxxx 09-08-20 09:02:11 N line 1 test
line 2 test
line 3 test
143593503 09-08-20 09:02:13... (3 Replies)
Im trying to parse ifconfig with awk and setup a bunch of variables in one shot. But Im having trouble figuring out how to work with data in previous lines.
ifconfig output:
eth0 Link encap:Ethernet HWaddr 00:50:DA:10:7F:1B
inet addr:10.10.10.10 Bcast:10.10.10.127 ... (0 Replies)
Hi Guys,
I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same.
can anyone of you please let me know how to go about it ? (8 Replies)
Hi,
I am in the process of configuring a script, and i intend it to retrieve logs for previous four hours, and then scan for predefined errors.
I am kind of stuck on the log retrieval part where the script will run early morning like 1 AM or 2 AM, the command as posted below will give me... (4 Replies)
Hi ,
i have a file with data as below.This is same file. But actual file contains to many rows.
i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ?
Field 004... (7 Replies)
I have a shell script that looks something like the following:
mysql -uroot db1 < db1.sql
mysql -uroot db2 < db2.sql
mysql -uroot db3 < db3.sql
mysql -uroot db4 < db4.sql
....
different db names in more than 160 lines.
I want to run this script with nohup and have a status later.
So,... (6 Replies)
I have requirement to search for a text in the file and retrieve required lines that is user defined with unix command.
Eg:
Find the text UNIX in the below file and need to return Test 8 & Test 9
Test 1
Test 2
Test 3
Test 4
UNIX
Test 5
Test 6
Test 7
Test 8
Test 9
Result can... (8 Replies)
Discussion started by: Arunkumarsak4
8 Replies
LEARN ABOUT DEBIAN
imdb-get
IMDB-TOOLS(1) General Commands Manual IMDB-TOOLS(1)NAME
imdb-get -- Looks up IMDB data for a film.
SYNOPSIS
imdb-get [options] [--imdb-id id] [-l id] [--search search string] [-s search string] [--filename filename] [-f filename] [-h ]
[--help]
DESCRIPTION
This manual page documents briefly the imdb-get command.
imdb-get has three modes. It can be called with imdb ID and a set of details to print, in which case it will retrieve those details either
from the cache or IMDB. Secondly, it can be called with a filename in which case it will look the file up in the cache (resolving symlinks
as appropriate and checking for multiple disks from the same film) and if that fails it will use the filename to search IMDB. Alterna-
tively it may be used with just a search string, which will always search IMDB.
OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is
included below.
-h--help
Print syntax and options.
-l--imdb-id
Specify IMDBID to use in queries.
-s--search
Specify search string to use in queries.
-f--filename
Specify filename. Will be used to form search queries if no ID or search string is specified.
-i--id
Print IMDB ID (default if nothing else is selected).
-t--title
Print film title.
-g--genre
Print film genres.
--tag
Print film tag line.
-y--year
Print film year.
-c--cover
Print cover art URI.
-m--print-filename
Print film genres.
-a--all
Print all film details.
-e--cachedir
Set cache directory.
-d--download-cover
Download cover art locally.
-r--refresh
Force an update from IMDB not the cache.
-n--rename
Rename file based on IMDB title.
-u--update-filename
Update the filename in a stored record
--prune-duplicates
Removes cache files with duplicate filename entries. (Removes all but the most recently modified cache file)
--refresh-cache
Refresh all the details in the cache from IMDB (may be slow).
FILES
Config options are read from /etc/imdbgetrc or $HOME/.imdbgetrc
SEE ALSO imdb(1)imdb-rename(1)imdb-link(1)imdb-update-cache(1)imdbgetrc(5)imdb-fxd(1)AUTHOR
This manual page was written by Matthew Johnson <debian@matthew.ath.cx>. Permission is granted to copy, distribute and/or modify this docu-
ment under the terms of the GNU General Public License, Version 2 as published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
IMDB-TOOLS(1)