10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have this file (1.txt):
>sample
TCGGCCCGJOHNTTTTGCGGGCCGCATTGTCGCCAGGCGCDOEGGGGTTTGCGATCGCCACGGGGCTGATGGTGGCGACCCGCTGCACCCGG
I am using the following script to "trim" the sequence
awk '{gsub(/^.*JOHN|DOE.*$/,"",$0)} 1'
This is the output:
>sample
TTTTGCGGGCCGCATTGTCGCCAGGCGC
... (6 Replies)
Discussion started by: Xterra
6 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
My files(.csv) are created in download path.
All the files files are having footer with count of rows or may be blank.
When i am trying to put this below code in shell script and run it, the row_num is not getting assigned,
but works correctly on command prompt.
I am trying to put this... (2 Replies)
Discussion started by: abhi_123
2 Replies
3. Shell Programming and Scripting
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies
4. Shell Programming and Scripting
Hi,
I am doing an AWK in ksh as below with the string to search to be read from variable but for some reason there is no output. It works when I hard code it.
awk 'substr($0,22,6)=="${VAR}"' XXX.txt' >YYY.txt
On reading other posts I tried below option,
'substr($0,22,6)=="/"${VAR}/""'
... (3 Replies)
Discussion started by: junnujayz
3 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I logged in to the unix solaris with my user name and then I again logged in with the sudo bash -l command
now when I do echo $PATH
It shows me => /usr/bin:/usr/local/bin:/usr/bin/usr/sbin:/usr/ucb:/usr/local/bin
How do i find out where is this file located for setting the... (3 Replies)
Discussion started by: siddhans
3 Replies
6. Shell Programming and Scripting
Hi,
I'm sure that it's a very simple issue.
this is a part of my code :
while read ligne
do
result=`ls -R ../FILES/|grep "."$ligne"$"`
echo $result
done<TYPE_EXT_FILES.txt
the echo return nothing (as my variable is empty).
I'm sure that the problem... (10 Replies)
Discussion started by: skubann
10 Replies
7. Shell Programming and Scripting
Friends,
I want to write a script. The logic follows
1. Script starts
2. SSH to Remote Machine and check whether /home/testUser dir is there or not.
3. If it is there, am assigning a value to a variable. else not
4. If the variable is set, the do the copy from remote machine to my local... (2 Replies)
Discussion started by: balamv
2 Replies
8. Shell Programming and Scripting
Hi all,
Something funny happen with this code:
EXIST=`ssh batch@190.2.332.234 'if ; then echo 0; else echo 1 ; fi'`
echo $EXIST
Above code will display "1".
The value of remotePath is /home/batch
The value of fileName is sample.txt
=========================================
... (1 Reply)
Discussion started by: suigion
1 Replies
9. Shell Programming and Scripting
The code im having problems with is highlighted in red, upon selecting option 2 on the main menu (highlighted green) my echo "NETWORK CONNECTIVITY" command seems to get overlooked and the resulting output is "Thank you for using the Operator Administrative Tool." being displayed. Can anyone tell me... (2 Replies)
Discussion started by: warlock129
2 Replies
10. Solaris
#!/bin/ksh
VAR_ONE=HELLO
TEMP=ONE
echo $VAR_${TEMP}
## Output is: ONE
Hi, I want the output to echo HELLO and not ONE as the above script does. I know I am missing something with dollar substitution. Can anyone help me out ?
Thanks.
Cal (4 Replies)
Discussion started by: calredd
4 Replies
KERNEL-IMG.CONF(5) Debian GNU/Linux manual KERNEL-IMG.CONF(5)
NAME
kernel-img.conf - site wide configuration file for kernel image packages
SYNOPSIS
/etc/kernel-img.conf
DESCRIPTION
The file /etc/kernel-img.conf is a simple file looked at by the kernel image post installation process to allow local options for handling
some aspects of the installation, overriding the defaults built into the image itself.
The format of the file is a simple VAR=VALUE pair. Boolean values may be specified as Yes, True, 1, and No, False, 0, and are case insensi-
tive. This file is automatically created by the installation script in certain circumstances.
At the moment, the user modifiable variables supported are:
postinst_hook
DEPRECATED: Set this variable to a script to be executed during installation. The path can be a relative path if the script lives in
a safe path -- that is, if it lives in /bin, /sbin, /usr/bin, or /usr/sbin, or must be an absolute path instead. Before calling this
script, the env variable STEM shall be set to the value of the --stem argument (or the default value, linux), and KERNEL_PACK-
AGE_VERSION shall be set to the version of the kernel-package that created the package. This script shall be called with two argu-
ments, the first being the version of the kernel image, and the second argument being the location of the kernel image itself.
Errors in the script shall cause the postinst to fail. Since debconf is in use before the script is called, this script should issue
no diagnostic messages to stdout -- while the postinst does call db_stop, debconf does not restore stdout, so messages to stdout
disappear. An example script for grub users is present in /usr/share/doc/kernel-package/ directory. This script is run after the
scripts in /etc/kernel/postinst.d directory.
postrm_hook
DEPRECATED: Set this variable to a script to be executed in the postrm (that is, after the image has been removed) after all the
remove actions have been performed. The path can be a relative path if the script lives in a safe path -- that is, if it lives in
/bin, /sbin, /usr/bin, or /usr/sbin, or must be an absolute path instead. The environment variable KERNEL_PACKAGE_VERSION shall be
set to the version of the kernel-package that created the package. This script shall be called with two arguments, the first being
the version of the kernel image, and the second argument being the location of the kernel image itself. Errors in the script shall
produce a warning message, but shall be otherwise ignored. Since debconf is in use before the script is called, this script should
issue no diagnostic messages to stdout -- while the postinst does call db_stop, debconf does not restore stdout, so messages to
stdout disappear. This script is run after the scripts in /etc/kernel/postrm.d directory.
preinst_hook
DEPRECATED: Set this variable to a script to be executed before the package is unpacked, and can be used to put in additional
checks. The path can be a relative path if the script lives in a safe path -- that is, if it lives in /bin, /sbin, /usr/bin, or
/usr/sbin, or must be an absolute path instead. The environment variable KERNEL_PACKAGE_VERSION shall be set to the version of the
kernel-package that created the package. This script shall be called with two arguments, the first being the version of the kernel
image, and the second argument being the location of the kernel image itself. This script is run after the scripts in /etc/ker-
nel/preinst.d directory.
prerm_hook
DEPRECATED: Set this variable to a script to be executed before the package files are removed (so any added files may be removed) .
The path can be a relative path if the script lives in a safe path -- that is, if it lives in /bin, /sbin, /usr/bin, or /usr/sbin,
or must be an absolute path instead. The environment variable KERNEL_PACKAGE_VERSION shall be set to the version of the kernel-pack-
age that created the package. This script shall be called with two arguments, the first being the version of the kernel image, and
the second argument being the location of the kernel image itself. Errors in the script shall cause the prerm to fail. Since debconf
is in use before the script is called, this script should issue no diagnostic messages to stdout -- while the postinst does call
db_stop, debconf does not restore stdout, so messages to stdout disappear. This script is run after the scripts in /etc/ker-
nel/prerm.d directory.
src_postinst_hook
DEPRECATED: Unlike the other hook variables, this is meant for a script run during the post inst of a docs, headers or a source
package. Using this hook for the headers package is now being deprecated, at some point the headers post install script shall only
run the header_postinst_hook. The path can be a relative path if the script lives in a safe path -- that is, if it lives in /bin,
/sbin, /usr/bin, or /usr/sbin, or must be an absolute path instead. The environment variable KERNEL_PACKAGE_VERSION shall be set to
the version of the kernel-package that created the package. This script shall be called with two arguments, the first being the
name of the package being installed (could be kernel source or headers), and the second argument being the version of the package
being installed. Errors in the script shall cause the postinst to fail. This script is run after the scripts in /etc/ker-
nel/src_postinst.d directory.
header_postinst_hook
DEPRECATED: Unlike the other hook variables, this is meant for a script run during the post inst of a headers package only. The path
can be a relative path if the script lives in a safe path -- that is, if it lives in /bin, /sbin, /usr/bin, or /usr/sbin, or must be
an absolute path instead. The environment variable KERNEL_PACKAGE_VERSION shall be set to the version of the kernel-package that
created the package. This script shall be called with two arguments, the first being the name of the package being installed, and
the second argument being the version of the package being installed. Errors in the script shall cause the postinst to fail. This
script is run after the scripts in /etc/kernel/header_postinst.d directory.
clobber_modules
If set, the preinst shall silently try to move /lib/modules/version out of the way if it is the same version as the image being
installed. Use at your own risk. This variable is unset by default.
warn_reboot
This variable can be used to turn off the warning given when installing a kernel image which is the same version as the currently
running version. If the modules list is changed, the modules dependencies may have been changed, and the modules for the new kernel
may not run correctly on the running kernel if the kernel ABI has changed in the meanwhile. It is a good idea to reboot, and this is
a note to remind you. If you know what you are doing, you can set this variable to no. This variable is set by default.
relink_build_link
This option manipulates the build link created by recent kernels. If the link is a dangling link, and if a the corresponding kernel
headers appear to have been installed on the system, a new symlink shall be created to point to them. The default is to relink the
build link (YES).
force_build_link
This option manipulates the build link created by recent kernels. If the link is a dangling link, a new symlink shall be created to
point to kernel headers data in /usr/src, whether they have been installed or not. The default is unset, we don't create potentially
dangling symlinks by default.
relink_src_link
This option manipulates the source link created by recent kernels. If the link is a dangling link it is deleted at install time. The
default is to relink (delete) the source link (YES).
silent_modules
This option has been put in for the people who are vastly irritated on being warned about preexisting modules directory /lib/mod-
ules/$version. That directory may belong to an old or defunct kernel image package, in which case problems may arise with leftover
modules in that directory tree, or the directory may legitimately exist due to a independent modules package being installed for
this kernel version that has already been unpacked. In this latter case the existence of the directory is benign. If you set this
variable, you shall no longer be given a chance to abort if a preexisting modules directory /lib/modules/$version is detected. This
is unset by default.
ignore_depmod_err
If set, does not prompt to continue after a depmod problem in the postinstall script. This facilitates automated installs, though it
may mask a problem with the kernel image. A diagnostic is still issued. This is unset be default.
FILES
The file described here is /etc/kernel-img.conf.
SEE ALSO
make(1), make-kpkg(1), kernel-pkg.conf(5), The GNU Make manual
BUGS
There are no bugs. Any resemblance thereof is delirium. Really.
AUTHOR
This manual page was written by Manoj Srivastava <srivasta@debian.org>, for the Debian GNU/Linux system.
Debian Aug 20 2009 KERNEL-IMG.CONF(5)