Sponsored Content
Top Forums UNIX for Advanced & Expert Users grep for lines not containing # Post 302650763 by cokedude on Monday 4th of June 2012 07:56:34 AM
Old 06-04-2012
Quote:
Originally Posted by zaxxon
Jajan's code worked flawless for me. Do you mind posting a helpful output of the error you got? Having 316 posts in this forum, you should be familiar giving detailed answers to solve your problems, thanks.
My problem is I didn't get an error. I got a ton of blank lines. The file has 4.5k of lines. I'm not sure what the preferred method is to deal with huge files.

Quote:
Originally Posted by itkamaraj
can you post the output of

Code:
 
cat -v /home/bob/.config/vlc/vlcrc

Here is 100 of the lines.

Code:
# Video filter module (string)
#video-filter=

# Video output filter module (string)
#vout-filter=

# Enable sub-pictures (boolean)
#spu=1

# On Screen Display (boolean)
#osd=1

# Text rendering module (string)
#text-renderer=

# Use subtitle file (string)
#sub-file=

# Autodetect subtitle files (boolean)
#sub-autodetect-file=1

# Subtitle autodetection fuzziness (integer)
#sub-autodetect-fuzzy=3

# Subtitle autodetection paths (string)
#sub-autodetect-path=./Subtitles, ./subtitles

# Force subtitle position (integer)
#sub-margin=0

# Subpictures filter module (string)
#sub-filter=

# Program (integer)
#program=0

# Programs (string)
#programs=

# Audio track (integer)
#audio-track=-1

# Subtitles track (integer)
#sub-track=-1

# Audio language (string)
#audio-language=

# Subtitle language (string)
#sub-language=

# Audio track ID (integer)
#audio-track-id=-1

# Subtitles track ID (integer)
#sub-track-id=-1

# Input repetitions (integer)
#input-repeat=0

# Start time (float)
#start-time=0.000000

# Stop time (float)
#stop-time=0.000000

# Run time (float)
#run-time=0.000000

# Fast seek (boolean)
#input-fast-seek=0

# Playback speed (float)
#rate=1.000000

# Input list (string)
#input-list=

# Input slave (experimental) (string)
#input-slave=

# Bookmarks list for a stream (string)
#bookmarks=

# DVD device (string)
#dvd=/dev/dvd

# VCD device (string)
#vcd=/dev/cdrom

# Audio CD device (string)
#cd-audio=/dev/cdrom

# UDP port (integer)
#server-port=1234

# MTU of the network interface (integer)
#mtu=1400

# Force IPv6 (boolean)
#ipv6=0

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep + lines after

Hello again, I'm still working on the redo of my script I created before and came across a grep question. I'm on SunOS 5.9 and using the Korn Shell. I'm writing a function to check for validation of root disks being mirrored. If the server allows me to use metastat, I'm looking to show it has... (4 Replies)
Discussion started by: Janus
4 Replies

2. Shell Programming and Scripting

grep and fetching lines after grep

suppose i have a file structure(serial file)-- ---------- ---------- --------- summery -------- ------ -------- finished ----- ------- i want to fetch lines from summery to finished i can get line of summery by grep command. but how can i fetch lines untill it reaches finished.probably... (2 Replies)
Discussion started by: arghya_owen
2 Replies

3. Shell Programming and Scripting

Grep and delete lines except the lines with strings

Hi I am writing a script which should read a file and search for certain strings 'approved' or 'removed' and retain only those lines that contain the above strings. Ex: file name 'test' test: approved package waiting for approval package disapproved package removed package approved... (14 Replies)
Discussion started by: vj8436
14 Replies

4. Shell Programming and Scripting

AIX equivalent to GNU grep's -B and -A [print lines after or before matching lines]

Hi folks I am not allowed to install GNU grep on AIX. Here my code excerpt: grep_fatal () { /usr/sfw/bin/gegrep -B4 -A2 "FATAL|QUEUE|SIGHUP" } Howto the same on AIX based machine? from manual GNU grep ‘--after-context=num’ Print num lines of trailing context after... (4 Replies)
Discussion started by: slashdotweenie
4 Replies

5. Shell Programming and Scripting

Print lines between two lines after grep for a text string

I have several very large file that are extracts from Oracle tables. These files are formatted in XML type syntax with multiple entries like: <ROW> some information more information </ROW> I want to grep for some words, then print all lines between <ROW> AND </ROW>. Can this be done with AWK?... (7 Replies)
Discussion started by: jbruce
7 Replies

6. Shell Programming and Scripting

Perl XML, find matching condition and grep lines and put the lines somewhere else

Hi, my xml files looks something like this <Instance Name="New York"> <Description></Description> <Instance Name="A"> <Description></Description> <PropertyValue Key="false" Name="Building A" /> </Instance> <Instance Name="B"> ... (4 Replies)
Discussion started by: tententen
4 Replies

7. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

8. Shell Programming and Scripting

AWK/GREP: grep only lines starting with integer

I have an input file 12.4 1.72849432773174e+01 -7.74784188610632e+01 12.5 9.59432114416327e-01 -7.87018212757537e+01 15.6 5.20139995965960e-01 -5.61612429666624e+01 29.3 3.76696387248366e+00 -7.42896194101892e+01 32.1 1.86899877018077e+01 -7.56508762501408e+01 35 6.98857157014640e+00... (2 Replies)
Discussion started by: chrisjorg
2 Replies

9. Shell Programming and Scripting

Grep couple of consecutive lines if each lines contains certain string

Hello, I want to extract from a file like : 20120530025502914 | REQUEST | whatever 20120530025502968 | RESPONSE | whatever 20120530025502985 | RESPONSE | whatever 20120530025502996 | REQUEST | whatever 20120530025503013 | REQUEST | whatever 20120530025503045 | RESPONSE | whatever I want... (14 Replies)
Discussion started by: black_fender
14 Replies

10. Shell Programming and Scripting

Grep three consecutive lines if each lines contains certain string

say we have : 2914 | REQUEST | whatever 2914 | RESPONSE | whatever 2914 | SUCCESS | whatever 2985 | RESPONSE | whatever 2986 | REQUEST | whatever 2990 | REQUEST | whatever 2985 | RESPONSE | whatever 2996 | REQUEST | whatever 2010 | SUCCESS | whatever 2013 | REQUEST | whatever 2013 |... (7 Replies)
Discussion started by: Saumitra Pandey
7 Replies
AFGETFRAMECOUNT(3)														AFGETFRAMECOUNT(3)

NAME
afGetFrameCount, afGetTrackBytes, afGetDataOffset - get the total sample frame count, length of audio track in bytes, offset of the audio track for a track in an audio file SYNOPSIS
#include <audiofile.h> AFframecount afGetFrameCount (AFfilehandle file, int track); AFfileoffset afGetTrackBytes (AFfilehandle file, int track); AFfileoffset afGetDataOffset (AFfilehandle file, int track); PARAMETERS
file is an audio file handle created by a previous call to afOpenFile(3). track is an integer which specifies an audio track within file. All supported file formats contain exactly one audio track per file, so the constant AF_DEFAULT_TRACK should always be used. DESCRIPTION
afGetFrameCount returns the total number of sample frames contained within the specified track of the specified file. Each sample frame of audio consists of a fixed number of samples (equal to the number of audio channels in the track. For monaural data, a sample frame consists of one audio sample. For stereophonic data, a sample frame consists of a stereo pair. afGetTrackBytes returns the total number of bytes of raw audio data (i.e., prior to decompression or conversion) in the track. afGetDataOffset returns the offset in bytes of the start of the audio data contained within the specified track of the specified file. RETURN VALUE
afGetFrameCount returns the total number of sample frames in track. afGetTrackBytes returns the total number of bytes of audio data in track. afGetDataOffset returns the offset in bytes to the beginning of the audio data in track. Each of these routines returns -1 in case of error. AUTHOR
Michael Pruett <michael@68k.org> Audio File Library 0.3.6 03/06/2013 AFGETFRAMECOUNT(3)
All times are GMT -4. The time now is 01:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy