Sponsored Content
Top Forums Shell Programming and Scripting fast search and replace in all files Post 302163417 by abovais on Friday 1st of February 2008 01:45:21 AM
Old 02-01-2008
That Did Not Serve The Purpose !

Actually, I want to count the number of "{" and "}" in a C code file. If the number of "}" is more than "{" then a error message should be shown that the number of "}" increases than "{" at "LINE", line number should be shown here.

Please help its urgent.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Fast way of find and replace, help

Hi All, I have nearly 200 files in a directory, each file is of nearly of 5000 lines. Each line of each file is having its 3rd field to be replaced by corresponding replace_string(2nd field of file1.out below). i.e. -Search the 3rd field of each line of each of 200 files in file1.out, get... (1 Reply)
Discussion started by: jkl_jkl
1 Replies

2. Shell Programming and Scripting

Search and Replace between two files

Hi all- I've got 2 files: One is the final results and one is a result set from a query. In the final results files I have placeholder strings in there that need to be replaced by the corresponding strings from the query file. So File#1 (FINAL RESULTS) LINEID CLIENT ID REP ... (1 Reply)
Discussion started by: Cailet
1 Replies

3. Shell Programming and Scripting

search and replace in many files

I have a directory full of files. Most of the code in the files is the same accept for a few parameter values. I want to remove hard coded values and replace it with a parameter that I can pass. This is oracle pl/sql anonymous blocks. so the code is similiar to this function myfunc (p_myvar ... (1 Reply)
Discussion started by: guessingo
1 Replies

4. Shell Programming and Scripting

Search and replace text in many files

Hello, I am very new to Linux and am trying to find a way for following problem. I have a number of files in a folder as Export000.dat, Export001.dat ..and so on. Each file has a string field 'Absolute velocity'. I want it to be replaced by 'Pixel shift' in all the files. I tried something like... (4 Replies)
Discussion started by: chirag.joshi
4 Replies

5. Shell Programming and Scripting

Search and replace string in files

I'm trying to remove the following string from several files. <img heigth="1" width="1" border="0" src="http://myteenmovies.net/t.php?id=5540372">I'm using the following script #!/bin/bash # This script will search and replace all regular files for a string # supplied by the user and... (1 Reply)
Discussion started by: d13g0sv
1 Replies

6. UNIX for Dummies Questions & Answers

Search and replace across files

Hi All, HP-UX oradev3 B.11.11 U 9000/800 3251073457 I have following files all contains text like "919642990137@". I need to search this text across all files and replace it with something like "919717298765@". I was wondering, how to accomplish this task? cpmprod_status.sh... (8 Replies)
Discussion started by: alok.behria
8 Replies

7. Programming

Search and replace in two different files

Hi there, i got the following problem. i need a bash script to correct e-mail addresses in an csv. i got a huge csv like this A B C D heiner.holber.somewhere.ch heiner holber heiner.holber@somewhere.ch So A is the wrong... (8 Replies)
Discussion started by: molker
8 Replies

8. Shell Programming and Scripting

Search and Replace in multiple files

Hello, I have hundreds of files in which I need to change email address. Here is what I am trying to do: 1. All text files are in a directory "a" 2. In the text file, I want to replace email address for preparer. All these lines start with {{PreparerEmail and end with }}. The email... (3 Replies)
Discussion started by: cartrider
3 Replies

9. Shell Programming and Scripting

Search replace with awk using 2 files

I have a bit of a complex problem that I would like to solve with awk. It is essentially a 2-part problem. I have a large directory of files with the same format, each with 266 lines. The first 206 lines of each file are filled with attribute information. Then the following 60 lines consist... (4 Replies)
Discussion started by: owwow14
4 Replies

10. UNIX for Dummies Questions & Answers

Search in one type of files and replace

I am not sure how to search and replace the word in the few specific files. I need to search and replace word in only the name containing pepsi in the filename. (12 Replies)
Discussion started by: ramkumar15
12 Replies
isdninfo(4)							   Special files						       isdninfo(4)

NAME
isdninfo - ISDN status device SYNOPSIS
#include <linux/isdn.h> DESCRIPTION
/dev/isdninfo is a character device with major number 45 and minor number 255. It delivers status information from the Linux ISDN subsys- tem to user level. DATA FORMAT
When reading from this device, the current status of the Linux ISDN subsystem is delivered in 6 lines of text. Each line starts with a tag string followed by a colon and whitespace. After that the status values are appended separated by whitespace. idmap is the tag of the first line. In this line for every virtual channel, the Id-string of the corresponding lowlevel driver is shown. If no driver is loaded, a - (hyphen) is shown. chmap is the tag of line 2. In this line for every virtual channel, the channel number of the corresponding lowlevel driver is shown. If no driver is loaded, -1 is shown. drmap is the tag of line 3. In this line for every virtual channel, the index number of the corresponding lowlevel driver is shown. If no driver is loaded, -1 is shown. usage is the tag of line 4. In this line for every virtual channel, the current usage is shown. The following usage constants are defined: ISDN_USAGE_NONE (0) Unused channel ISDN_USAGE_RAW (1) Channel used by raw device (currently unsupported) ISDN_USAGE_MODEM (2) Channel used by some ttyI ISDN_USAGE_NET (3) Channel used by an ISDN net-interface ISDN_USAGE_VOICE (4) Channel used by some ttyI in voice mode. ISDN_USAGE_EXCLUSIVE (64) Channel exclusively preserved for a net-interface. This value is logically or'ed with one of the other codes. ISDN_USAGE_OUTGOING (128) Channel is used outgoing. This value is logically or'ed with one of the other codes. It is set, when dialling is started and reset, when either dialling failed or after hangup. Therefore, it is not always an indicator for an established connection. To get a reliable indicator for an established connection, the driver flags (see below) have to be inspected also. flags is the tag of line 5. In this line for every driver slot, it's B-Channel status is shown. If no driver is registered in a slot, a ? is shown. For every established B-Channel of the driver, a bit is set in the shown value. The driver's first channel is mapped to bit 0, the second channel to bit 1 and so on. phone is the tag of line 6. In this line for every virtual channel, the remote phone number is shown if the channel is active. A ??? is shown, if the channel is inactive. BLOCKING BEHAVIOUR
After opening the device, at most 6 lines can be read by a user process. After that, the user process is blocked. Whenever a status change happens, the process is allowed to read 6 more lines, starting with line one. IOCTL FUNCTIONS
Currently, there are two ioctl calls supported: IIOCGETDVR Get Revision information. Returns an unsigned long value v, representing various user level interface revisions, where (v & 0xff) is the revision of the modem-register info, available via ioctl on /dev/isdnctrl. ((v >> 8) & 0xff) is the revision of the net-interface config data, available via ioctl on /dev/isdnctrl. and ((v >> 16) & 0xff) is the revision of the data delivered via /dev/isdninfo itself. IIOCGETCPS Get transfer statistics. Returns the number of bytes transferred so far for all virtual channels. The third parameter should be a pointer to an array of unsigned long of size ISDN_MAX_CHANNELS * 2. This array is filled with the byte counter values upon return. OTHER CONSTANTS
There are some more useful constants defined in /usr/include/linux/isdn.h: ISDN_TTY_MAJOR The major device number of /dev/ttyI. ISDN_TTYAUX_MAJOR The major device number of /dev/cui. ISDN_MAJOR The major device number of /dev/isdnctrl, /dev/isdninfo, /dev/ippp and /dev/isdn ISDN_MAX_DRIVERS The number of driver slots. ISDN_MAX_CHANNELS The number of virtual channels. ISDN_MINOR_CTRL The minor device number of /dev/isdnctrl0. ISDN_MINOR_CTRLMAX The minor device number of /dev/isdnctrl63. ISDN_MINOR_PPP The minor device number of /dev/ippp0. ISDN_MINOR_PPPMAX The minor device number of /dev/ippp64. ISDN_MINOR_STATUS The minor device number of /dev/isdninfo. Other constants, necessary for ioctl's on /dev/isdnctrl are listed in isdnctrl(4). AUTHOR
Fritz Elfert <fritz@isdn4linux.de> SEE ALSO
isdnctrl(4), icnctrl(4). ISDN 4 Linux 3.25 1999/09/06 isdninfo(4)
All times are GMT -4. The time now is 09:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy