Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Defining EDITOR Variable - Tru64 Post 302268283 by Bagel08 on Monday 15th of December 2008 10:14:03 AM
Old 12-15-2008
Defining EDITOR Variable - Tru64

Hi,

I have to edit a lot of partitions soon and wanted to do so with EMACS rather than VI.

The "disklabel -e -r disknumber" command picks up VI as it's defined, but how do I set "-e" so it uses EMACS instead please?

Thanks...!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

defining a variable as a number or character?

I am writing a script that needs to accept numbers into a variable by prompting and using the code read num case $num in 000) break ;; *) I am fairly new to unix and am loving the versatility of the language but need a little shove in the right... (1 Reply)
Discussion started by: noobian
1 Replies

2. AIX

How to set path for the EDITOR variable?

For some reason something has changing in my AIX environment where when I type: ACLEDIT filename ...I get: 3002-104 acledit: EDITOR environment variable must be full pathname I know I need to reset the EDITOR variables path to /usr/bin/vi but I can't remember the syntax anyone? (2 Replies)
Discussion started by: heprox
2 Replies

3. UNIX for Dummies Questions & Answers

Defining Variables

I'm trying to define a variable named sin I already have a variable named cos, which has the value "hello" I want sin to have the value of "hellothere", so sin would be something like sin = $cos & "there" but I'm not sure that I know the syntax. Can anyone help? :confused: (4 Replies)
Discussion started by: sailorliones
4 Replies

4. Shell Programming and Scripting

how to dereference the variable in sed editor

Hi I am trying to do the substitution using the 'sed' editor. In the line below I am trying to substitute all instances of XXX by the value of the variable PX sed 's/XXX/${PX}/g' ${TEMPLETE} > ${TEMPLETE}.${PX} The problem is that 'sed' editor takes ${PX} literary (without retrieving the... (2 Replies)
Discussion started by: aoussenko
2 Replies

5. Shell Programming and Scripting

set EDITOR=vi -> default editor not setting for cron tab

Hi All, I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by set EDITOR=vi it does not open a vi editor , rather it do as below..... ///////////////////////////////////////////////////// $ set... (6 Replies)
Discussion started by: aarora_98
6 Replies

6. Shell Programming and Scripting

defining variables

Hey all, I was wondering if someone would take a look at this script I'm working on. I don't know if i have the syntax correct for my variables and if the for loop is written correctly. any assistance would be greatly appreciated. #!/usr/bin/bash ###########################################... (12 Replies)
Discussion started by: em23
12 Replies

7. Shell Programming and Scripting

defining a variable using multiple "entries/columns" within a line using read

Hello All, I am trying to figure out how to use the read command. I have a txt file that has rows looking something like this: 1 2 3 4 5 6 7 8 9 where each number represents an entry of various characters deliminated by tabs. My goal is to set entries 2-7 as a variable/string that I... (3 Replies)
Discussion started by: Torinator
3 Replies

8. UNIX for Dummies Questions & Answers

defining variable in .profile

In root dir i have created a .profile file and added variable and assigned a path to it: a = '/dir/dir' export a but when i echo (echo $a) the path or use this variable the value or path not getting displayed. i tried executing the .profile and logging out and logging in, didnt workout. am... (1 Reply)
Discussion started by: abhi_n123
1 Replies

9. UNIX for Dummies Questions & Answers

Help with defining PATH

Hi All, I have a trivial question but I dont know how to solve it. So basically I'm working on a USB key and I have a directory with some scripts which I use to work on files present in other directories within the USB or sometimes on the main harddisk too. The problem is every time I have to... (3 Replies)
Discussion started by: pawannoel
3 Replies

10. UNIX for Dummies Questions & Answers

Defining variable problem

Hi I'd say I'm having this weird problem where my script isn't taking the value off a variable or printing it. My code is like this: set count_C= `grep -c C mols` set count_H= `grep -c H mols` set count_O= `grep -c O mols` sed -i '7,7 s/$/ $count_C $count_O $count_H/g' input It... (8 Replies)
Discussion started by: saleheen
8 Replies
DISKLABEL(9)						   BSD Kernel Developer's Manual					      DISKLABEL(9)

NAME
disklabel, readdisklabel, writedisklabel, setdisklabel, bounds_check_with_label -- disk label management routines SYNOPSIS
char * readdisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp, struct cpu_disklabel *clp); int writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp, struct cpu_disklabel *clp); int setdisklabel(struct disklabel *olp, struct disklabel *nlp, u_long openmask, struct cpu_disklabel *clp); int bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel); DESCRIPTION
This collection of routines provides a disklabel management interface to kernel device drivers. These routines are classified as machine- or architecture-dependent because of restrictions imposed by the machine architecture and boot-strapping code on the location of the label, or because cooperation with other operating systems requires specialized conversion code. readdisklabel() attempts to read a disklabel from the device identified by dev, using the device strategy routine passed in strat. Note that a buffer structure is required to pass to the strategy routine; it needs to be acquired and parameterized for the intended I/O operation, and disposed of when the operation has completed. Some fields in the disklabel passed in lp may be pre-initialized by the caller in order to meet device driver requirements for the I/O operation initiated to get to the disklabel data on the medium. In particular, the field ``d_secsize'', if non-zero, is used by readdisklabel() to get an appropriately sized buffer to pass to the device strategy routine. Unspeci- fied fields in lp should be set to zero. If the medium does not contain a native disklabel that can be read in directly, readdisklabel() may resort to constructing a label from other machine-dependent information using the provided buffer passed in the clp argument. If a disk label can not be found or constructed, a string containing an approximated description of the failure mode is returned. Otherwise the NULL string is returned. writedisklabel() stores disk label information contained in the disk label structure given by lp on the device identified by dev. Like readdisklabel(), it acquires and sets up an I/O buffer to pass to the strategy routine strat. writedisklabel() may elect to do a machine- dependent conversion of the native disk label structure (using the buffer pointed at by clp), to store the disk label onto the medium in a format complying with architectural constraints. writedisklabel() returns 0 on success and EINVAL if the disk label specifies invalid or inconvertible values. Otherwise, any error condition reported by the device strategy routine in the buffer's ``b_error'' field is returned. setdisklabel() checks a proposed new disk label passed in nlp for some amount of basic sanity. This includes a check on attempts to change the location, or reduce the size, of an existing disk partition that is currently in use by the system. The current disposition of the disk partitions is made available through olp and openmask, which provide, respectively, the existing disk label and a bit mask identifying the partitions that are currently in use. Failure to pass on ``basic sanity'', results in a EINVAL return value, while a vetoed update of the partition layout is signaled by a EBUSY return value. Otherwise, 0 is returned. bounds_check_with_label() is used to check whether a device transfer described by bp to the device identified by dev, is properly contained within a disk partition of the disk with label lp. If this check fails, bounds_check_with_label() sets the buffer's ``b_error'' field to EINVAL, sets the B_ERROR flag in ``b_flags'', and returns -1. If the argument wlabel is zero, and the transfer is a write operation, a check is done if the transfer would overwrite (a portion of) the disklabel area on the medium. If that is the case, EROFS is set in ``b_error'', the B_ERROR flag is set in ``b_flags'', and -1 is returned. Note that wlabel should be set to a non-zero value if the intended operation is expected to install or update the disk label. Programs that intend to do so using the raw device interface should notify the driver by using a DIOCWLABEL ioctl function. SEE ALSO
disklabel(5), disklabel(8) BSD
December 26, 1996 BSD
All times are GMT -4. The time now is 10:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy