You might want to consider using awk. As a starting point, working for your sample, try and then adapt to your needs:
Not every awk implementation will accept above RS construct, so you might need to experiment a bit.
Hi,
I was trying to use this particular option of grep
grep -r 'Search_pattern' *
This command should ideally search all the occurrences of Search_pattern recursively within a directory & print it on shell prompt. But this command is not doing what is expected. It just displays nothin!
... (8 Replies)
This condition is not able to grep , can any one tell what's wrong with this part.
I am able to see from unix command but not with host script.
echo "Checking for Loader Status " >> $REPFILE
if test $? = 0
then
echo "Successful termination of SQL*Loader "$LOADER1 >>... (5 Replies)
Hi,
I've prob in doing grep. I want to grep line staring with number 531250 in the 1st column from a file (example in picture attached below)
using command
grep -w "531250" file
my ideal result should be
531250 1 21 42.1 100 1e-05 ... (8 Replies)
Hello all,
I'm trying to substract 1 minute from the current date and take the hour and minute (for filename purpose).
1) If I want hour an minute from current time I can use:
timetmp=$(date +"%H:%M")
2) To substract 1 minute from current time I can use:
timetmp=$(date --date "$dte -1... (8 Replies)
Hello, I'm going crazy about this. I'm using grep to filter some values as in pas -ef | grep asterisk. When I use the same with -f somefile something weird happens, if somefile is created with vi it'll work, if somefile is created with vi but values are pasted from an Excell file it will not work.... (2 Replies)
Hi All..I need a help i am trying to find a word using below script whereas the word exists in my file nitin.txt as a directory but still i am getting "word not found" output..Your suggestions welcomed.:
#to check for existence of nitin
#!/bin/bash
cd /apps/uat1/deploy/app
ls -lrt >... (4 Replies)
Hello.
I want to get all modules which are loaded and which name are exactly 2 characters long and not more than 2 characters and begin with "nv"
lsmod | (e)grep '^nv????????????
I want to get all modules which are loaded and which name begin with "nv" and are 2 to 7 characters long
... (1 Reply)
Hi all,
I got a new mac and can't get grep, awk etc to work.
I tried the following command:
grep DICER test.txt
output:
AGOER
text.txt looks like this:
DICER
DICER
AGOWhat is wrong?
Please use code tags (23 Replies)
Ahoy friends.
Currently i got a bash script running to manage my minecraft servers.
All of them are stored in /home/minecraft_servers directory.
Using my script im able to start a server (e.g. ./minecraft start ftb_continuum) because server name and server name are the same.(e.g.... (2 Replies)
Discussion started by: Knogle
2 Replies
LEARN ABOUT LINUX
bashbug
BASHBUG(1) bashbug BASHBUG(1)NAME
bashbug - report a bug in bash
SYNOPSIS
bashbug [--help] [--version] [bug-report-email-addresses]
DESCRIPTION
bashbug is a utility for reporting bugs in Bash to the maintainers.
bashbug will start up your preferred editor with a preformatted bug report template for you to fill in. Save the file and quit the editor
once you have completed the missing fields. bashbug will notify you of any problems with the report and ask for confirmation before
sending it. By default the bug report is mailed to both the GNU developers and the Debian Bash maintainers. The recipients can be changed
by giving a comma separated list of bug-report-email-addresses.
If you invoke bashbug by accident, just quit your editor. You will always be asked for confirmation before a bug report is sent.
OPTIONS --help
Show a brief usage message and exit.
--version
Show the version of bashbug and exit.
bug-report-email-addresses
Comma separated list of recipients' email addresses. By default the report is mailed to both the GNU developers and the Debian Bash
maintainers.
ENVIRONMENT
DEFEDITOR
Editor to use for editing the bug report.
EDITOR
Editor to use for editing the bug report (overridden by DEFEDITOR).
SEE ALSO bash(1), reportbug(1), update-alternatives(8) for preferred editor.
AUTHOR
This manual page was written by Christer Andersson <klamm@comhem.se> for the Debian project (but may be used by others).
GNU Bash 3.1 11 December 2007 BASHBUG(1)