11-18-2013
thank you i will try the -n option to see if it works.
i use the backticks because this way i tell the script if the command inside the backticks executes successfully then proceed. else if the command fails it doesnt get into the if statement.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a PHP Script that works perfectly on a server that uses Sendmail. However I tried to port it to a new server that has the Postfix to Sendmail compatibility interface, and it doesn't work properly.
The php.ini file has the path for sendmail on both servers set to: /usr/sbin/sendmail -t... (0 Replies)
Discussion started by: boopfm523
0 Replies
2. Shell Programming and Scripting
How do you do an ssh on a for statement. I have done ssh on individula lines of code before with no problems.
#!/usr/bin/ksh
cat server_list.txt | while read line
do
ssh $line "for i in `lslpp -l |grep tsm`
do
lslpp -Lc $i |grep -v State |tr ':' ',' |awk -F, '{print $2, "," ,... (4 Replies)
Discussion started by: din
4 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I am facing an issue while trying to access a for loop variable inside ssh. Can anyone please help me with what this issue is, the following is the code that I have ->
IMPL_LOG_FOLDERS=(transaction_logs invalid_transaction_logs)
sshg3 ftp_id@boxname << EOS
for log_folder in... (5 Replies)
Discussion started by: anindyabecs
5 Replies
4. Shell Programming and Scripting
Here is the smallest extract to demonstrate the problem that I experience.
#!/bin/bash
r=$1
while read ip
do
if ] ;then
x=`ssh $ip echo "$ip"`
else
x=`echo "$ip"`
fi
echo $x
done << EOF
192.168.8.241
192.168.8.241
EOF
# Any IP with public key set (0 Replies)
Discussion started by: ivolvo
0 Replies
5. Shell Programming and Scripting
I need help on how to connect remote systems through ssh command in while loop of shell script. I was able to connect one remote system using ssh from shell script. Please find sample code snippet as given below…..
ssh "root@148.147.179.100" ARG1=$rpmFileName 'bash -s' <<'ENDSSH'
... (5 Replies)
Discussion started by: rajesh.tulluri
5 Replies
6. Shell Programming and Scripting
Hi All,
I've a csv file in which the record is getting break into 1 line or more than one line. I want to combine those splits into one line and remove the unwanted character existing in the record i.e. double quote symbol ("). The line gets break only when the record contains double... (4 Replies)
Discussion started by: rajak.net
4 Replies
7. Shell Programming and Scripting
I have a shell script, and its pretty much done, I decided to add a loop that ends or continues depending on user input. like "would you like to continue?" and if I hit y or yes it will run the loop again until I hit n or no and breaks out of the loop.
To be hones I didn't think I needed to add... (2 Replies)
Discussion started by: Demon_Jester
2 Replies
8. Shell Programming and Scripting
#!/bin/ksh
for SRV in imawasp01 \
imawasp02 \
imawasp03 \
imawasp04 \
imawasp05 \
imawasp06 \
imawasp07 \
imawasp08 \
imawasp09
do
print "${SRV}"
while read PASSLINE
do
SRVNAME=`echo ${PASSLINE} | awk -F\: '{print $1}'`
LASTLOGIN=`ssh ${SRV} lsuser ${SRVNAME} | tr '... (2 Replies)
Discussion started by: port43
2 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
Need an urgent solution to an issue . We have created a ksh file or shell script which generates 1 DAT file. the DAT file contains extract of a select statement .
Now the issue is , when we are executing the ksh file , the output is coimng with page breaks and line breaks .
We have... (4 Replies)
Discussion started by: Ayaskant
4 Replies
10. Shell Programming and Scripting
I am trying to check multiple server's "uptime" in a loop over "ssh".
When I execute multiple ssh commands with hard coded servernames script is executing fine.
But when I pass server names using while loop, script is exiting after checking first server's status, why?
# serverList... (8 Replies)
Discussion started by: kchinnam
8 Replies
LEARN ABOUT FREEBSD
loader.4th
LOADER.4TH(8) BSD System Manager's Manual LOADER.4TH(8)
NAME
loader.4th -- loader.conf processing tools
DESCRIPTION
The file that goes by the name of loader.4th is a set of commands designed to manipulate loader.conf(5) files. The default /boot/loader.rc
includes loader.4th and uses one of its commands to automatically read and process the standard loader.conf(5) files. Other commands exists
to help the user specify alternate configurations.
The commands of loader.4th by themselves are not enough for most uses. Please refer to the examples below for the most common situations,
and to loader(8) for additional commands.
Before using any of the commands provided in loader.4th, it must be included through the command:
include loader.4th
This line is present in the default /boot/loader.rc file, so it is not needed (and should not be re-issued) in a normal setup.
The commands provided by it are:
boot
boot kernelname [...]
boot directory [...]
boot -flag ... Boot as specified by the loader.conf(5) files read.
Depending on the arguments passed, it can override boot flags and either the kernel name or the search path for
kernel and modules.
boot-conf
boot-conf kernelname [...]
boot-conf directory [...]
boot-conf -flag ... Works like boot described above, but instead of booting immediately, uses autoboot, so it can be stopped.
start Reads /boot/defaults/loader.conf, all other loader.conf(5) files specified in it, then loads the desired kernel
and modules (if not already loaded). After which you can use the boot or autoboot commmands or simply exit
(provided autoboot_delay is not set to NO) to boot the system. start is the command used in the default
/boot/loader.rc file (see loader(8)).
initialize Initialize the support library so commands can be used without executing start first. Like start, it reads
/boot/defaults/loader.conf and all other loader.conf(5) files specified in it (but does not load kernel or
modules). Returns a flag on the stack to indicate if any configuration files were successfully loaded.
read-conf filename Reads and processes a loader.conf(5) file. Does not proceed to boot.
enable-module module Enables the loading of module.
disable-module module Disables the loading of module.
toggle-module module Toggles the loading of module on and off.
show-module module Shows the information gathered in the loader.conf(5) files about the module module.
retry Used inside loader.conf(5) files to specify the action after a module loading fails.
ignore Used inside loader.conf(5) files to specify the action after a module loading fails.
try-include file [file ...]
Process script files if they exist. Each file, in turn, is completely read into memory, and then each of its
lines is passed to the command line interpreter. If any error is returned by the interpreter, the try-include
command aborts immediately, without reading any other files, and silently returns without error.
FILES
/boot/loader The loader(8).
/boot/loader.4th loader.4th itself.
/boot/loader.rc loader(8) bootstrapping script.
/boot/defaults/loader.conf
File loaded by the start command.
EXAMPLES
Standard /boot/loader.rc:
include /boot/loader.4th
start
Load a different kernel with the standard configuration:
set kernel="kernel.old"
unload
boot-conf
Read an additional configuration file and then proceed to boot:
unload
read-conf /boot/special.conf
boot-conf
Disable the loading of the splash screen module and bitmap and then proceed to boot:
unload
disable-module splash_bmp
disable-module bitmap
boot-conf
SEE ALSO
loader.conf(5), loader(8)
HISTORY
The loader.4th set of commands first appeared in FreeBSD 3.2.
AUTHORS
The loader.4th set of commands was written by Daniel C. Sobral <dcs@FreeBSD.org>.
BUGS
A British espionage series.
BSD
November 13, 2013 BSD