-n tells sed print only requested lines
/^#/ search for lines starting with # and then execute the following commands
{N; read in next line
s/^#.*\n/ substitute the comment part by nothing
\(.........\) save the first nine characters in \1
.* substitute the rest by noting
/p} print the matched and substituted line.
I install an external disk on my sun solaris 8
this went fine and I was able to access all filesystem on the disk. the new disk is mounted on /local
then 6 hours later
files under /local/files was 1 byte in size
at the same time I received the following
error message in... (4 Replies)
My site has a few sun solaris server including out NIS server and NFS server on solaris machines. we also have few suse linux and redhat linux machine.
All our home directory is on our NFS server(sun Solaris) and this is automounted through /etc/auto_master and /etc/auto_home this worked fine... (1 Reply)
Hello,
I have a SUN Solaris 9 machine (Sun-Fire-V490).
I put a DVD in the reader to install a software. The automount procedure did not work (vold is running) : I have nothing under /cdrom
When I try "eject" command I have the answer "No default media available"
When I try to mount manually the... (3 Replies)
Folks;
I'm mounting a directory on a different SUSE 10 server from my SUSE server fine. using this mount command:
# mount 192.168.132.11:/var/local/new /var/local/new
this command above works fine but when i added a new line to my "/etc/fstab" to be mounted automatically every time i... (2 Replies)
Hi friends
I'm a newbie trying to automount a nfs shared directory. Below is the configuration I'm using
FreeBSD machine as NFS server. IP Address - 192.168.1.60
# cat /etc/exports
/shared 192.168.1.50
Solaris 10 as NFS client. IP Address - 192.168.1.50
# cat... (1 Reply)
Hello experts,
On my RHEL box when i mount a nfs file system using autofs, the df -t shows the file system as nfs only. For which mounts does it report the filesystem as autofs. ?? I actually want to see the filesystem getting reported as autofs instead of nfs. Pls guide me
I... (1 Reply)
When i export the directory where the data really is, i can specify which hosts can mount it. On the remote server i create a mount point directory and then mount it to the source servers directory (that has the data).
I need to run my script on Server X , i would login there and type in the... (11 Replies)
Discussion started by: bkilaru
11 Replies
LEARN ABOUT MINIX
ed
ED(1) General Commands Manual ED(1)NAME
ed - editor
SYNOPSIS
ed file
OPTIONS
- Suppress line/byte count messages (for in scripts)
EXAMPLES
ed prog.c # Edit prog.c
echo '1,$p' | ed - file
# Odd way to write 'cat file'
DESCRIPTION
Ed is functionally equivalent to the standard V7 editor, ed. It supports the following commands:
(.) a: append
(.,.)c: change
(.,.)d: delete
e: edit new file"
f: print name of edited file"
(1,$)g: global command
(.) i: insert
(.,.+1)j: join lines together
(.) k: mark
(.) l: print with special characters in octal
(.,.)m: move
(.,.)p: print
q: quit editor"
(.) r: read in new file
(.,.)s: substitute
(1,$)v: like g, except select lines that do not match
(1,$)w: write out edited file
Many of the commands can take one or two addresses, as indicated above. The defaults are shown in parentheses. Thus a appends to the cur-
rent line, and g works on the whole file as default. The dot refers to the current line. Below is a sample editing session with comments
given following the # symbol.
ed prog.c # Edit prog.c
3,20p # Print lines 3 through 20
/whole/ # Find next occurence of whole
s/whole/while/ # Replace whole by while
g/Buf/s//BUF/g # Replace Buf by BUF everywhere
w # Write the file back
q # Exit the editor
Ed is provided for its sentimental value. If you want a line-oriented editor, try ex. If you want a good editor, use elle, elvis, or
mined.
SEE ALSO elvis(1), elle(9), mined(9).
ED(1)