Hello I am very new to shell and I bought some books and trying to learn it. I started trying to write a script that will take a number and count it down to 1 with commas in between. This number can only be one argument. If lower than one or higher than one argument it sends an error message.
Here is an example of the output:
input: countdown.sh 8
output: 8,7,6,5,4,3,2,1
input: countdown.sh 8 2
output: error: program must be executed with one argument.
Here is what I have so far. I am stuck because I am not sure how you differentiate between arguments and values.
Any help would be appreciated.
Hi,
I'm trying to write a shell script that has a menu and then dependant on the selection, will automate some samba file transfer.
The problem is when I run the code without the case statement it runs fine. but when I put the case statement in the only way I can get the code to run is to... (6 Replies)
Hi I am trying to create a shell script that will
look for a contracthead file first and if the contract head file does not exist on day1 exit script.
Now on day2 if contracthead exists or not run the script uploading files in order
such as contract line then contract contact
so the... (2 Replies)
In a case statement like below :
case $rental in
"car") echo "For $rental Rs.20 per k/m";;
"van") echo "For $rental Rs.10 per k/m";;
"jeep") echo "For $rental Rs.5 per k/m";;
"bicycle") echo "For $rental 20 paisa per k/m";;
*) echo "Sorry, I can not gat a $rental for you";;... (4 Replies)
Hi,
I am having a shell Script which i need to modify. I am new to shell scripting , needs help. The Logic which needs to be incorporated is as follows :-
The script need to check the length of first Line in a data fine and of the length of the file is > 130 then validated the input... (2 Replies)
I am writing a bash script that asks the user for input and I need it to repeat until the user selects quit.. I dont know how to write the loop for it I searched all over but i still do not get it.. if anyone could help with this it would be greatly apprciated here is my script so far:
#!... (2 Replies)
I want to make the file test condition a variable ($Prmshn in code below).
My goal is to use something like the first three unsuccessful if statetments since the 'if
#!/bin/ksh
test_input()
{
Prmshn=${1}
InFLNm=${2}
ifReq="-$Prmshn $InFLNm"
#the following three if statments fail:
#if ] ;... (10 Replies)
Hi All, when I executed the query in normal unix mode, the output is
expected. if I executed the query using shell script, I am not getting the result. not sure whether I need to use dbms_output.put_line or echo.
dbms_output.put_line("COUNTRY_CODE"||" "||"SUB_TYPE"||" ... (3 Replies)
have written the below code to check whether the string received from user is a file name or dir using case statement, but its going into default case*).
#!/bin/sh
#Get a string from user and check whether its a existing filename or not
rm str2
rm str3
echo "enter a file \c"
read fil... (8 Replies)
I have to create a couple of files within a directory structure.
Filename stays the same, but at the end of each file, the number appears.
Example:
File needs to be created within directory c:\temp
File Name will stay the same (testfile), but extension will increase, starting at 01 - example... (1 Reply)
Please see part of a shell script below.
#Move folder to HOT folder
echo " moving $PRE_OCR_DIR/$BATCHNAME to $HOT_FOLDER_DIR\n"
#chmod -R 777 $PRE_OCR_DIR/$BATCHNAME
mv $PRE_OCR_DIR/$BATCHNAME $HOT_FOLDER_DIR
I wish to write an if statement around the move
that if that if $BATCHNAME... (3 Replies)
Discussion started by: worky
3 Replies
LEARN ABOUT DEBIAN
ptpd
ptpd(8) Precision Time Protocol daemon ptpd(8)NAME
ptpd - Precision Time Protocol daemon (1588-2008)
SYNOPSIS
ptpd [?] [-c] [-S] [-f FILE] [-R FILE] [-d] [-D] [-x] [-M NUMBER] [-t] [-T ttl] [-a NUMBER,NUMBER] [-w NUMBER] [-b NAME] [-u ADDRESS] [-e]
[-h] [-l NUMBER,NUMBER] [-o NUMBER] [-i NUMBER] [-n NUMBER] [-y NUMBER] [-m NUMBER] [-g] [-v NUMBER] [-r NUMBER] [-s NUMBER] [-p NUMBER]
[-q NUMBER]
DESCRIPTION
Implements the Precision Time Protocol (PTP) Version 2 as defined by the IEEE 1588-2008 standard. PTP was developed to provide very precise
time coordination of LAN connected computers.
PTPd is a complete implementation of the IEEE 1588 v2 specification for a standard (ordinary) clock. PTPd has been tested with and is known
to work properly with other IEEE 1588 implementations. The source code for PTPd is freely available under a BSD-style license. Thanks to
contributions from users, PTPd is becoming an increasingly portable, interoperable, and stable IEEE 1588 implementation.
For more information, see http://ptpd.sourceforge.net/
OPTIONS
-? display a short help text
-c run in command line (non-daemon) mode
-S log information to syslog
-f FILE
send output to FILE
-R FILE
record a quality FILE
-d display stats
-D display stats in .csv format
-x do not reset the clock if off by more than one second
-M NUMBER
do not reset the clock if off by more than NUMBER nanoseconds
-t do not adjust the system clock
-T set multicast TTL for packets. Defaults to 1.
-a NUMBER,NUMBER
specify clock servo P and I attenuations
-w NUMBER
specify one way delay filter stiffness
-b NAME
bind PTP to network interface NAME
-u ADDRESS
also send uni-cast to ADDRESS
-e run in ethernet mode (level2)
-h run in End to End mode
-l NUMBER,NUMBER
specify inbound, outbound latency in nsec
-o NUMBER
specify current UTC offset
-i NUMBER
specify PTP domain number
-n NUMBER
specify announce interval in 2^NUMBER sec
-y NUMBER
specify sync interval in 2^NUMBER sec
-m NUMBER
specify max number of foreign master records
-g run as slave only
-v NUMBER
specify system clock allen variance
-r NUMBER
specify system clock accuracy
-s NUMBER
specify system clock class
-p NUMBER
specify priority1 attribute
-q NUMBER
specify priority2 attribute
AUTHOR
Gael Mace <gael_mace@users.sourceforge.net> & Alexandre Van Kempen.
Steven Kreuzer <skreuzer@freebsd.org>
George Neville-Neil <gnn@freebsd.org>
This manual page was written by Gael Mace for any Linux environment project.
version 2.1.0 October, 2010 ptpd(8)