10 More Discussions You Might Find Interesting
1. Homework & Coursework Questions
Just started learning Unix and received my first assignment recently. We haven't learned many commands and honestly, I'm stumped. I'd like to receive assistance/guidance/hints.
1. The problem statement, all variables and given/known data:
How do I write a shell script that takes in a file or... (4 Replies)
Discussion started by: fozilla
4 Replies
2. Shell Programming and Scripting
I have a program that requires the user to enter input values while it is being run
for example in bash
...
...
..
echo "Enter your input"
read input
echo $input
...
...
...I need to schedule this program with crontab, hence a problem, cronjobs run in the background, any ideas on how to... (10 Replies)
Discussion started by: walforum
10 Replies
3. Shell Programming and Scripting
Hi,
while true
do
printf "$FBOLD\nPlease enter the minutes (0-59): $FREG"
read MIN
case "$MIN" in
||s) break 2;;
*)
echo ""
echo "Invalid minutes, please try again.";;
esac
done
In the above... (4 Replies)
Discussion started by: milink
4 Replies
4. Solaris
Please give me any example for standard input in Solaris. (6 Replies)
Discussion started by: karman0931
6 Replies
5. UNIX for Dummies Questions & Answers
Hello Experts,
I was wondering how can we get a fall trough case structure.
Eg: If we have two cases A and B and a default; if I do not break after A, it should execute all the statements of A as well as B if I break after B else fall through even lower.
I tried this:
#!/bin/sh
v1=1... (6 Replies)
Discussion started by: hkansal
6 Replies
6. UNIX for Dummies Questions & Answers
Hello Experts,
I ve been trying to build another shell where I am using the following code.
transact="tv5cpc1"
case "$transact" in
"...cp..")
xActType=""
;;
"...de..")
xActType="sp_dep"
;;
"...ep..")
xActType="sp_epa"
;;
"....v.")
... (4 Replies)
Discussion started by: hkansal
4 Replies
7. Shell Programming and Scripting
Dear...
I have a scrpit that contains multiple read command.... when I run the script I have to enter 3 variables so that I can get the output..
but, I dont want to put those 3 inputs manually every time... I want to make a shell that reads the 3 inputs from a file.
the script name is... (4 Replies)
Discussion started by: yahyaaa
4 Replies
8. Shell Programming and Scripting
Hi,
Can anyone help me with the following case structure?
echo "Please enter the date for which you want the Report:\c"
read dat
d1=`echo $dat|cut -c7-8`
m1=`echo $dat|cut -c5-6`
y1=`echo $dat|cut -c1-4`
yr=`expr "$d1" - 1`
case "$yr" in
0)
MONTH=`expr "$m1" - 1`... (4 Replies)
Discussion started by: kamitsin
4 Replies
9. Shell Programming and Scripting
how can i redirect standard input? i dont remember :/, though could you redirec not from a command? i mean, to redirect always stdin and stout (1 Reply)
Discussion started by: Jariya
1 Replies
10. UNIX for Dummies Questions & Answers
Hello,
I am having a problem setting a range of numbers for the "case" structure.
I can use with no problems, but
when I use it doesn't work???
Does the case struture allow numeric ranges?
eg:
echo -e "enter number between 0 and 60: \c"
read $answer
case $answer in
) echo... (2 Replies)
Discussion started by: Joe54321
2 Replies