09-13-2019
I am very silly and just thought to use a case statement to achieve what I need to. It is working now.
Please ignore my ramblings
Have a great day all
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i wrote a while script as part of a huge program. this script, once picked, begins to output data to the person using it. pretty easy, as the person doesn't have to keep typing commands to get the output that the while loop automatically throws out.
now, the thing is, while this while-script... (3 Replies)
Discussion started by: Terrible
3 Replies
2. Shell Programming and Scripting
I have not done any scrpting before and also new to unix. Thanks.
I am using wget to download contents as below:
wget http://server/app/browse/downloadRaw?id=23456I want to do this programatically. For example, I have a list of id in a text file as below:
list.txt
----------
23456... (1 Reply)
Discussion started by: Lilly
1 Replies
3. Shell Programming and Scripting
Hi All,
I am stuch in a script where a for loop is running to execute some commands for some values.
Now my problem is i have to have an if condition that if the first iteration is successful then it has to exit the for loop otherwise it has to continue normally.
my code is this:
for... (5 Replies)
Discussion started by: usha rao
5 Replies
4. Shell Programming and Scripting
I am trying to validate links inside file if its up or not.
Heres what I am trying :
#!/bin/bash
link='cat url'
get=$(wget -q "$link")
if
then echo "Link not up"
else echo "OK"
fi
$ ./validate
./validate: line 4:
Please suggest ..
Thanks, (2 Replies)
Discussion started by: sriram003
2 Replies
5. Shell Programming and Scripting
I googled this and couldn't find an answer, so I rolled my own. Here it is, hope it helps. Feel free to improve on it.
#!/bin/bash
PWORD=
ANYKEY=0
echo -n "Password: "
until
do
read -N 1 -s ANYKEY
echo -n "*"
PWORD="$PWORD$ANYKEY"
done
echo
echo $PWORD
exit (3 Replies)
Discussion started by: krisdames
3 Replies
6. Emergency UNIX and Linux Support
Below for loop not exiting. Can someone help?
JBOSS_INST_ARGS=01 02
if ; then
for i in $JBOSS_INST_ARGS; do
/u/jboss-6.1.0.Final/bin/jboss_init_wise$i.sh start;
done (8 Replies)
Discussion started by: vino_hymi
8 Replies
7. Shell Programming and Scripting
Hello,
I tried to write a bash script (code is below) that does scp files that contain a certain string, and that subsequently deletes only those files that have been copied (in my case new files are created every second so it is important to only delete those that have been copied). The key is... (0 Replies)
Discussion started by: kjartan
0 Replies
8. Shell Programming and Scripting
Hi, I have written a script that allows me to repetitively play a music file $N times, which is specified through user input. However, if I want to exit the script before it has finished looping $N times, if I use CTRL+c, I have to CTRL+c however many times are left in order to complete the loop.... (9 Replies)
Discussion started by: hilltop_yodeler
9 Replies
9. Shell Programming and Scripting
Hi,
I have first script which on IR remote command event execute the second script. If the second script is executed, it display echo "timeout expired" after 10s. This works as expected.
But I also want to reset timer (increase time) in case if the second script is executed again within 10s.
... (8 Replies)
Discussion started by: armatron
8 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 HPUX
calendar
calendar(1) General Commands Manual calendar(1)
NAME
calendar - reminder service
SYNOPSIS
DESCRIPTION
consults the file in the current directory and prints out lines containing today's or tomorrow's date anywhere in the line. On weekends,
``tomorrow'' extends through Monday.
When a command-line argument is present, searches for the file in each user's home directory, and sends any positive results to the user by
(see mail(1)). Normally this is done daily in the early morning hours under the control of (see cron(1M)). When invoked by reads the
first line in the file to determine the user's environment.
Language-dependent information such as spelling and date format (described below) are determined by the user-specified statement in the
file. This statement should be of the form where language is a valid language name (see lang(5)). If this line is not in the file, the
action described in the section is taken.
is concerned with two fields: month and day. A month field can be expressed in three different formats: a string representing the name of
the month (either fully spelled out or abbreviated), a numeric month, or an asterisk (representing any month). If the month is expressed
as a string representing the name of the month, the first character can be either upper-case or lower-case; other characters must be lower-
case. The spelling of a month name should match the string returned by calling (see nl_langinfo(3C)). The day field is a numeric value
for the day of the month.
Month-Day Formats
If the month field is a string, it can be followed by zero or more blanks. If the month field is numeric, it must be followed by either a
slash or a hyphen If the month field is an asterisk it must be followed by a slash The day field can be followed immediately by a blank or
non-digit character.
Day-Month Formats
The day field is expressed as a numeral. What follows the day field is determined by the format of the month. If the month field is a
string, the day field must be followed by zero or one dot followed by zero or more blanks. If the month field is a numeral, the day field
must be followed by either a slash or a hyphen If the month field is an asterisk, the day field must be followed by a slash
EXTERNAL INFLUENCES
Environment Variables
determines the format and contents of date and time strings when no statement is specified in the file.
determines the language in which messages are displayed.
If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari-
able. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization
variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
EXAMPLES
The following file illustrates several formats recognized by calendar:
In the following file, dates are expressed according to European English usage:
WARNINGS
To get reminder service, either your calendar must be public information or you must run from your personal file, independent of any run
systemwide. Note that if you run yourself, the calendar file need not reside in your home directory.
extended idea of ``tomorrow'' does not account for holidays.
This command is likely to be withdrawn from X/Open standards. Applications using this command might not be portable to other vendors'
platforms.
AUTHOR
was developed by AT&T and HP.
FILES
to figure out today's and tomorrow's dates
SEE ALSO
cron(1M), nl_langinfo(3C), mail(1), environ(5).
STANDARDS CONFORMANCE
calendar(1)