12-16-2009
-- /dev/null --
Last edited by ichigo; 12-16-2009 at 10:08 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I originally had a shell script that did a grep 10 times to pull out the number of times a certain pattern occured in a file: ie...
aOccurances=`grep aPattern file|wc -l`
bOccurances=`grep bPattern file|wc -l`
...
...
...
fOccurances=`grep fPattern file|wc -l`
As the file got bigger with... (0 Replies)
Discussion started by: junkmail426
0 Replies
2. Shell Programming and Scripting
Hi,
In my shell script i have to match a patten in a file , if found i have to prefix the entair line by a "word"
eg. pattern = "aaa" prefix= #123
file: bbbb xxx
zzzz aaaa
qqqq kkkk
outPut file: bbbb xxx
... (5 Replies)
Discussion started by: shivarajM
5 Replies
3. Shell Programming and Scripting
Hi All ,
I need to extract the strings that are matching with the pattern : CUST.<AnyStringOfAnyLength>.<AnyStringOfAnyLength> from a file and then write all these string into another file.
e.g. If a file SOURCE contains following lines :
IF(CUST.ABCD.EFGH==1) THEN
CUST.ABCD.EFGH =... (7 Replies)
Discussion started by: swapnil.nawale
7 Replies
4. Shell Programming and Scripting
would like to print word between matched patterns using sed
for example :
create INDEX SCOTT.OR_PK ON table_name(....)
would like to print between SCOTT. and ON which is OR_PK
Please help me out
Thanks (4 Replies)
Discussion started by: jhonnyrip
4 Replies
5. Shell Programming and Scripting
I have the following code. I want to remove the --sort=num/num/... and am
using grep to exclude it as shown below:
I have a bit of problem figuring out the use of - at the front
echo "--sort=4/5/6" | grep -ivE '-((sort|group)=+/+(/+)*)$'
Now suppose I want to remove --quiet
I can... (7 Replies)
Discussion started by: kristinu
7 Replies
6. Shell Programming and Scripting
Hi,
I have got the below requirement. please suggest.
I have a file like,
Processing Item is:
/data/ing/cfg2/abc.txt
/data/ing/cfg3/bgc.txt
Processing Item is:
/data/cmd/for2/ght.txt
/data/kernal/config.klgt.txt
I want to process the above file to get the output file like,
... (5 Replies)
Discussion started by: rbalaj16
5 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a file f1 wi the following data
f1.txt
========
Report ID
Report Name
-----------------------------------------------------------------
Post Requests : 2 Post successes : 2
=============================================
I need to search for the... (2 Replies)
Discussion started by: RP09
2 Replies
8. Shell Programming and Scripting
Hi,
here are few lines present in the logs. I want to grep on Error and print few lines before and after Error word is found
line1
Line2
Line3
Error
Line4
Line5
Line6
Line7
I want the output to be
Line2
Line3
Error
Line5 (1 Reply)
Discussion started by: arghadeep adity
1 Replies
9. UNIX for Dummies Questions & Answers
Hi all!
Thanks for taking the time to view this!
I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern.
Example:
Drink a soda
Eat a banana
Eat multiple bananas
Drink an apple juice
Eat an apple
Eat multiple apples
I... (8 Replies)
Discussion started by: demmel
8 Replies
10. Shell Programming and Scripting
Hi expert, Need help in shell script.
a.txt file output is below
i would like to grep 3 line and 1st column value which is admin\22226 only and not full line. i only know admin word as 22226 can come anything with admin\ in file.
also after fetching it i would like to use this... (1 Reply)
Discussion started by: kuljeetpal
1 Replies
LEARN ABOUT REDHAT
fdformat
FDFORMAT(8) Linux Programmer's Manual FDFORMAT(8)
NAME
fdformat - Low-level formats a floppy disk
SYNOPSIS
fdformat [ -n ] device
DESCRIPTION
fdformat does a low level format on a floppy disk. device is usually one of the following (for floppy devices, the major = 2, and the
minor is shown for informational purposes only):
/dev/fd0d360 (minor = 4)
/dev/fd0h1200 (minor = 8)
/dev/fd0D360 (minor = 12)
/dev/fd0H360 (minor = 12)
/dev/fd0D720 (minor = 16)
/dev/fd0H720 (minor = 16)
/dev/fd0h360 (minor = 20)
/dev/fd0h720 (minor = 24)
/dev/fd0H1440 (minor = 28)
/dev/fd1d360 (minor = 5)
/dev/fd1h1200 (minor = 9)
/dev/fd1D360 (minor = 13)
/dev/fd1H360 (minor = 13)
/dev/fd1D720 (minor = 17)
/dev/fd1H720 (minor = 17)
/dev/fd1h360 (minor = 21)
/dev/fd1h720 (minor = 25)
/dev/fd1H1440 (minor = 29)
The generic floppy devices, /dev/fd0 and /dev/fd1, will fail to work with fdformat when a non-standard format is being used, or if the for-
mat has not been autodetected earlier. In this case, use setfdprm(8) to load the disk parameters.
OPTIONS
-n No verify. This option will disable the verification that is performed after the format.
SEE ALSO
fd(4), setfdprm(8), mkfs(8), emkfs(8)
AUTHOR
Werner Almesberger (almesber@nessie.cs.id.ethz.ch)
Linux 0.99 1 February 1993 FDFORMAT(8)