I have an awk script contained within a ksh script that I want to read the contents of a file with, say 3 records. Fields are a, b, and c, delimiter '|'.
I want to read the file and then I want to set different variables for $1, $2, $3 to be used as parameters to run a series of reports outside... (2 Replies)
I've a list file, which has some file names.
ex: list file "list_file" will have
data_file1.txt
data_file2.txt
data_file3.txt
:
:
data_filen.txt
Above files will have the below layout:
Header1
Header2
*TM*
Data record 1
Datarecord 2
Datarecord n
*TM* (19 Replies)
Hi guys
I have a shell script that executes sql statemets and sends the output to a file.the script takes in parameters executes sql and sends the result to an output file.
#!/bin/sh
echo " $2 $3 $4 $5 $6 $7
isql -w400 -U$2 -S$5 -P$3 << xxx
use $4
go
print"**Changes to the table... (0 Replies)
Hello,
I have this awk script that I want to execute by passing parameters through a shell script.
I'm a little confused. This awk script removes duplicates from an input file.
Ok, so I have a .sh file called rem_dups.sh
#!/usr/bin/sh... (4 Replies)
hi everyone
i am trying to do this
bash> cat abc.sh
deepak()
{
echo Deepak
}
deepak
bash>./abc.sh
Deepak
so it is giving me write simply i created a func and it worked
now i modified it like this way
bash> cat abc.sh (2 Replies)
I am getting the following error while passing parameter to a shell script called within awk script. Any idea what's causing this issue and how to ix it ? Thanks
sh: -c: line 0: syntax error near unexpected token `newline'
sh: -c: line 0: `./billdatecalc.sh ... (10 Replies)
Discussion started by: Sudhakar333
10 Replies
7. Post Here to Contact Site Administrators and Moderators
Variable I have in my shell script
diff=$1$2.diff
id=$2
new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk -F'~' ''$2 == "$id"' {print $0}' > $new
I could see value of $id is not passing to the awk... (0 Replies)
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff |... (1 Reply)
I'm trying to create a shell script that takes a awk script that I wrote and a filename as an argument. I was able to get that done but I'm having trouble figuring out how to keep the header of the output at the top but sort the rest of the rows alphabetically. This is what I have now but it is... (1 Reply)
Discussion started by: Eric7giants
1 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)