01-02-2007
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a small query. I have a file containing the following lines
abcd<12></12>fdfgdf<12>sdfgfg<12>
sdfsdf<12></12>ytunfg<12>
hggfhf<12>rtysb<12>zdfgdfg<12>
Now I wish to delete ONLY the last occurance of string <12> from every lines of code. That mease my final output will be like this:... (7 Replies)
Discussion started by: dkhanna01
7 Replies
2. Shell Programming and Scripting
What I'm trying to do is, using awk, loading the log file into an array matching column 2, counting the match and finding the first occurance and last occurance of column 1 being it a date.
08052006:AAA
08052006:AAA
08052006:BBB
09052006:AAA
15052006:BBB
11052006:CCC
19052006:CCC... (5 Replies)
Discussion started by: ping
5 Replies
3. Shell Programming and Scripting
Hi
I have a file which contains the following two lines which are same But I would like to insert the value=8.8.8.8 in the 1st occurance line and value=9.9.9.9 in the 2nd occurance line.
<parameter name="TestIp1" value="">
<parameter name="TestIp1" value="">
Please suggest (1 Reply)
Discussion started by: madhusmita
1 Replies
4. Shell Programming and Scripting
I want to call a script like this:
./somescript some-thing.knows.what.ending
Inside the script it needs to split at last .(period)
so I can:
a=some-thing.knows.what
b=ending
I know I can do it in perl but im still learing awk and sed.
Thanks (3 Replies)
Discussion started by: Ikon
3 Replies
5. Shell Programming and Scripting
Hi,
I'm trying to match records using awk which contain only one occurance of my string, I know how to match one or more (+) but matching only one is eluding me without developing some convoluted bit of code. I was hoping there would be some simple pattern matching thing similar to '+' but... (9 Replies)
Discussion started by: jonathanm
9 Replies
6. Shell Programming and Scripting
Hi All,
I have a data as follow:
0
0
0
X
X
0
X
X
X
0
X
0
0
X
0
0 (16 Replies)
Discussion started by: nica
16 Replies
7. Shell Programming and Scripting
A PERL script that prints just the first occurrence of a string in a file and immediately exits (the string and the filename are the first and the second command line arguments; I used filehandle to open an input file). (1 Reply)
Discussion started by: aadi_uni
1 Replies
8. Shell Programming and Scripting
#original file
.
.
~
~
Index=2
xxx
replace #dont replace 1st occurance
yyy
Index=2
xxx
replace #substitue replace with "REPLACE"
yyy
Index=2
xxx
replace #substitue replace with "REPLACE"
yyy
Index=3
xxx
replace (3 Replies)
Discussion started by: cjjoy
3 Replies
9. Shell Programming and Scripting
Hello
Im trying to grep for a string in grub.conf . I've used the -F option since its a long string, but when i execute, i run into errors. Script and output below.
GRUBPASSWD="password --md5 xyz"
if grep -Fxq $GRUBPASSWD /etc/grub.conf
then
.
.
output:
grep: unrecognized option... (5 Replies)
Discussion started by: bludhemn
5 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
From the below file. I need to get only the first occurrence and print. I tried to do it in separate grep not coming as expected
Original file
11001;1213;304;;;;;;;111020677.64;;;;;;;;;;;;;;;;;;;;;;;;;;
11001;1214;304;;;;;;;102376462.96;;;;;;;;;;;;;;;;;;;;;;;;;;... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies
mnttab(4) Kernel Interfaces Manual mnttab(4)
NAME
mnttab - mounted file system table
SYNOPSIS
DESCRIPTION
resides in directory and contains a table of devices mounted by the command (see mount(1M)). The file contains a line of information for
each mounted filesystem which is structurally identical to the contents of described by fstab(4).
There are a number of lines of the form:
special_file_name dir type opts freq passno mount_time
consisting of entries similar to:
is accessed by programs that use (see getmntent(3X)). It should never be manually edited or overwritten.
mount_time contains the time the file system was mounted using Its value is the number of seconds since the Epoch (00:00:00 Coordinated
Universal Time, January 1, 1970 (see time(2).
The file is a pseudo-file whose contents are dynamically created based on the kernel's private in-core mount table. The file will always
reflect the latest file system and operations. rewrites the file if it is found to be deleted or corrupted. (see syncer(1M)).
WARNINGS
The table is provided only as a means for programs to return information about mounted file systems.
should never be edited, either with a text editor or with the delmntent(3X) and addmntent(3X) API's. The kernel will ignore all writes to
so these API's will return success even though they do not actually modify
AUTHOR
was developed by the University of California, Berkeley, Sun Microsystems, Inc., and HP.
FILES
SEE ALSO
mount(1M), getmntent(3X), fstab(4).
mnttab(4)