I am trying to substituted a variable to a file using sed. However, the value of that variable is not being substituted. Here is an example of my code.
lf='
'
v_whole="${1} ${2} ${3} $lf"
cp ${IPPDIR}/ctl/fax_sub_text_a.${4}.${5}.txt... (1 Reply)
In a file I want to globally change a "|" charater by a new line character.
I am using the command
1,$s/\|/??/g
Can anybody say what should I put in place of ?? in the above command? (3 Replies)
Hi ,
I am stuck up in the below scenario:-
I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression.
How can I use SED inside SHELL Scripting and command prompt as... (2 Replies)
Hi ,
I am stuck up in the below scenario:-
I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression.
How can I use SED inside SHELL Scripting and command prompt as well to... (1 Reply)
Hi,
What is the actual difference between these two? Why the following code works for process substitution and fails for command substitution?
while IFS= read -r line; do echo $line; done < <(cat file)executes successfully and display the contents of the file
But,
while IFS='\n' read -r... (3 Replies)
All,
I have this text document that contains a listing(See below).
What i would like to ask is how i could extract just the information i need which is the files name (CWS*****.***.gz)
If anyone has any suggestions i would be very grateful. I am sure its relatively simple but i just... (6 Replies)
Hello, I have a file with 10,000+ records which look like this:
Image3992170.tif 4/21/200811:42:09AM 3,373.13KB
Image3993265.tif 4/11/20087:17:58PM 2,369.72KB
Image3996764.tif 5/2/200811:01:28AM 2,155.87KB
Image3997700.tif ... (4 Replies)
Hello, I'm trying to do a substitution in vi. which adds a field for the year to a line.
If the line doesnt include a year, it should still add a field (although empty)
the fields are:
Country:number:number:name(and sometimes year):place
this is a desired in and output:
Sweden:55:32:John... (2 Replies)
Hi experts,
Could someone help me how to figure out the following substitution?
I copied and pasted a column of names from an Excel file into another file in vi. The column of data has last names with dash (hyphens) and apostrophes. My goal is to do the following:
1) remove the apostrophes... (10 Replies)
I am trying to do some substitutions using the substitution operator (:%s) in a text file.
I want to replace all A1, A2, A3.......A100 in my text file.
I used :%s/A2/SAE/g successfully until A9 but when I use A1, all the A11 to A19 is changed. How do I specify the exact match here? (8 Replies)
Discussion started by: Kanja
8 Replies
LEARN ABOUT ULTRIX
kvar
kvar(8) System Manager's Manual kvar(8)Name
kvar - modify RISC kernel variables in memory or on disk
Syntax
/usr/etc/kvar -r(b|w|l) [options] vmunix
/usr/etc/kvar -w(b|w|l) [options] vmunix
Description
The command allows you to read or write RISC kernel variables, either in the on-disk image of or the active in-memory image. The -r form
of the command does variable reads; the -w form does variable writes. The variable length qualifiers are: b (1 byte), w (word, or 2
bytes), and l (longword, or 4 bytes).
Variable contents are displayed in hexadecimal format.
Options-a address Specifies the address of the kernel variable. Either the -a or -s option must be specified. The address is specified as
either a positive decimal or hexadecimal constant.
-k Instructs to use the in-memory image of The default is to use the on-disk copy.
-l Searches for a local symbol. The default is a global symbol search.
-o offset Adds an offset to the address (or address of the symbol name). The offset value is specified as either a positive decimal or
hexadecimal constant.
-s name Specifies the name of the kernel variable.
-v value Specifies the new value to be assigned by the -w form of The -v option is ignored if the -r form of is being used. The value
is specified as either a positive decimal or hexadecimal constant.
Restrictions
You must have appropriate file access permissions for (and for with the -k option).
The command is available only on RISC systems. For VAX systems, use to modify kernel variables.
Examples
This example reads the variable `udpcksum' from the running kernel image:
% kvar -k -rl -s udpcksum /vmunix
This example sets the `xyz' variable to zero in the running kernel image:
% kvar -k -wl -s xyz -v 0 /vmunix
This example sets the variable `xyz' to -1 in the on-disk image of making this value persistent across reboots:
% kvar -wl -s xyz -v 0xffffffff /vmunix
This example sets to zero 1 byte at offset 2 from address 0x80161a98 in the running kernel image:
% kvar -k -wb -o 2 -a 0x80161a98 /vmunix
FilesSee Alsoadb(1), dbx(1)
RISC kvar(8)