It is not a bit strange to assume external resources in the config file.
E.g. use $line, hoping that $line exists in the calling script.
If you really want that, you should put the per-line code in a function
and ---------- Post updated at 14:02 ---------- Previous update was at 13:26 ----------
@rbatte1, the shell split differs from awk: a last empty field is not counted, $num_fields differs then.
Further, your code needs the delimiter
and protection from argument expansion with
If the positional parameters can be used then there is no need for an array, and this works even with old Bourne shells
Hello,
I know this is somewhat strange, but please let me know if possible. I want to execute a program file in the remote machine with command on the local machine. Let me make things more clear.
Suppose I have a cc on my local system and do not have that on the remote system. I want to use... (2 Replies)
Hi all,
I want to assign a command name to a file.e.g.
suppose I have a .sh file "xyz.sh". I want to execute the file by typing in "abc".
The desired output is:
$ abc
should execute the "xyz.sh" file.
Kind Regards,
Qasim (4 Replies)
Hi there, am trying to parse an Apache 'server' config file. A snippet of the config file is shown below:
.....
ProxyPassReverse /foo http://foo.example.com/bar
.....
.....
RewriteRule ^/(.*) http://www.example.com/$1
RewriteRule /redirect https://www.example1.com/$1
........ (7 Replies)
Hi,
I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below.
I will be using the config file as mentioned below:
(config.txt)
country:a,b
city:1,2
type:b1... (1 Reply)
Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated.
script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made.
OS :Susi linux ver 10.3.
... (4 Replies)
Hello Experts,
I would like to know the best way to assign a value to variable from a given file and execute a command including this variable for each entry from the file. to be more clear, i have a file with different lines (each line with a different value). i want to substitute the variable... (2 Replies)
Hi,
As a newbie, I'm desperate ro make my shell script work. I'd like a script which checks all the files in a directory, check the file name, if the file name ends with "extracted", store it in a variable, if it has a suffix of ".roi" stores in another variable. I'm going to use these two... (3 Replies)
how to execute shell script present in unix machine remotely from windows?
I having a shell script in my unix machine, need to execute the script remotely from my windows machine using Visual Basic or VBA macros.
Thanks In Advance.
--Suresh (1 Reply)
Hi,
file1.txt
AAA
BBB
CCC
DDD
file2.txt
abc|AAA|AAAabcbcs|fnwufnq
bca|nwruqf|AAA|fwfwwefwef
fmimwe|BBB|fnqwufw|wufbqw
wcdbi|CCC|wefnwin|wfwwf
DDD|wabvfav|wqef|fwbwqfwfe
i need the count of rows of file1.txt present in the file2.txt
required output:
AAA 2 (10 Replies)
Discussion started by: mdkm
10 Replies
LEARN ABOUT FREEBSD
boot.config
BOOT.CONFIG(5) BSD File Formats Manual BOOT.CONFIG(5)NAME
boot.config -- Configuration file for the boot blocks
DESCRIPTION
The boot.config file contains options for the FreeBSD boot block code.
When the FreeBSD boot loader runs, it searches the ``a'' slice of the boot partition for a boot.config file (as a result, slices which are
missing an ``a'' partition require user intervention during the boot process). If the boot.config file is found, its contents are used as
the default configuration options for the boot block code and are echoed to the system console.
A valid format of this file is to put BIOS drive number, a controller type, a unit number, a partition, a kernel file name, and any other
valid boot(8) option on a single line, as it is done at the ``boot:'' prompt.
The options related to the boot image selection described below and all the other options available for boot.config are documented in detail
in the boot(8) manual page.
FILES
/boot.config parameters for the boot blocks (optional)
EXAMPLES
The command:
# echo "-P" > /boot.config
will activate the serial console of FreeBSD.
The command:
# echo "1:ad(1,a)/boot/loader" > /boot.config
will instruct the second stage of boot(8) on the first disk to boot with the third boot(8) stage from the second disk.
The command:
# echo "1:ad(1,a)/boot/loader -P" > /boot.config
will do both of the above.
SEE ALSO boot(8), loader(8)AUTHORS
This manual page was written by Daniel Gerzo <danger@FreeBSD.org>.
BSD May 13, 2007 BSD