02-15-2011
Thanks everyone for the replies. I will try out these solutions on the data I have.
@Chubler_XL,
I had a question. Why did you first assign FS="------*" and then again OFS=FS ? Can you explain that.
Thanks,
Sandeep
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello All,
can anyone help me out in extracting the pattern from a file...
The Input file is:
NFS B.11.11 ONC/NFS; Network-FileSystem,InformationServices,Utilities|123
NParProvider B.11.11.01.04.01.01 nPartition Provider|456
NPartition A.01.02 Enhanced NPartition Commands/789... (6 Replies)
Discussion started by: aajan
6 Replies
2. Shell Programming and Scripting
Hello ,
I need your help to extract a line in a big file , and this line is always 11 lines
before a specific pattern . Do you know a way via Awk ?
Thanks in advance
npn35 (17 Replies)
Discussion started by: npn35
17 Replies
3. Shell Programming and Scripting
Hi
I have a pattern like :
SYSTEM_NAME-232-S7-200810060949.LOG
Here I need to extract system name and the timestamp and also the numeric number after "-S" i.e 7 here .
I am not very sure of whether I should use sed / awk for this ?:confused:
Thanks,
Priya. (6 Replies)
Discussion started by: priyam
6 Replies
4. Shell Programming and Scripting
This is my first post, please be nice. I have tried to google and read different tutorials.
The task at hand is:
Input file input.txt (example)
abc123defhij-E-1234jslo
456ujs-W-abXjklp
From this file the task is to grep the -E- and -W- strings that are unique and write a new file... (5 Replies)
Discussion started by: TestTomas
5 Replies
5. Shell Programming and Scripting
I have hundreds of files to process. In each file
I need to look for a pattern then
extract value(s) from next line and then
search for value(s) selected from point (2) in the same file at a specific position.
HEADER ELECTRON TRANSPORT 18-MAR-98 1A7V
TITLE CYTOCHROME... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies
6. Shell Programming and Scripting
2014-05-31-18.22.18.500158-240 E11115478A502 LEVEL: Info
PID : 25100668 TID : 73282 PROC : db2sysc 0
INSTANCE: udbin001 NODE : 000 DB :
APPHDL : 0-18345 APPID: *LOCAL.udbin001.140531200018
AUTHID : udbin001
EDUID : 73282 ... (4 Replies)
Discussion started by: ilugopal
4 Replies
7. Shell Programming and Scripting
Hi ,
I have a file where i have modifed certain things compared to original file . The difference of the original file and modified file is as follows.
# diff mir_lex.c.modified mir_lex.c.orig
3209c3209
< if(yy_current_buffer -> yy_is_our_buffer == 0) {
---
>... (5 Replies)
Discussion started by: breezevinay
5 Replies
8. Shell Programming and Scripting
I am trying to use awk to extract and print the first ocurrence of NM_ and NP_ with a : before in each line. The input file is tab-delimeted, but the output does not need to be. The below does execute but prints all the lines in the file not just the patterns. Thank you :).
file tab-delimeted
... (2 Replies)
Discussion started by: cmccabe
2 Replies
9. Shell Programming and Scripting
Hi,
Could you please help me finding a way to replace a specific value in a text block when matching a key pattern ?
I got the keys and the values from a command similar to:
echo -e "key01 Nvalue01-1 Nvalue01-2 Nvalue01-3\nkey02 Nvalue02-1 Nvalue02-2 Nvalue02-3 \nkey03 Nvalue03-1... (2 Replies)
Discussion started by: alex2005
2 Replies
10. Shell Programming and Scripting
Hello.
Here is a file contents :
declare -Ax NEW_FORCE_IGNORE_ARRAY=(="§" ="§" ="§" ="§" ="§" .................. ="§"Here is a pattern
=I want to extract 'NEW_FORCE_IGNORE_ARRAY' which is the whole word before the first occurrence of pattern '='
Is there a better solution than mine :... (3 Replies)
Discussion started by: jcdole
3 Replies
icheck(8) System Manager's Manual icheck(8)
NAME
icheck - File system storage consistency check
SYNOPSIS
/usr/sbin/icheck [-b numbers] [file system]
DESCRIPTION
The icheck command is obsoleted for normal consistency checking by fsck.
The icheck command examines a file system, builds a bit map of used blocks, and compares this bit map against the free map maintained on
the file system. If the file system is not specified, a set of default file systems is checked. The normal output of icheck includes a
report of the following items: The total number of files and the numbers of regular, directory, block special, character special, and fifo
files. The total number of blocks in use and the numbers of single-, double-, and triple-indirect blocks and directory blocks. The number
of free blocks. The number of blocks missing; that is, not in any file or in any free map.
A list of block numbers follows the -b option; whenever any of the named blocks turn up in a file, a diagnostic is produced.
The icheck command is faster if the raw version of the special file is used since it reads the i-list many blocks at a time.
NOTES
Since icheck is inherently two-pass in nature, extraneous diagnostics may be produced if applied to active file systems. It believes even
preposterous super-blocks and consequently causes a core dump.
DIAGNOSTICS
For duplicate blocks and bad blocks which lie outside the file system, icheck announces the difficulty, the i-number, and the kind of block
involved. If a read error is encountered, the block number of the bad block is printed and icheck considers it to contain zero.
FILES
Specifies the command path.
RELATED INFORMATION
Commands: clri(8), fsck(8), ncheck(8) delim off
icheck(8)