10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Why wont my for statements work? Im trying to get this script to swich to a user an if you put in a start/stop/or restart paramater to do just that for each user. I commented out the actual start/stop actions to test it just by using echos and not do anything hasty in the environment but it... (0 Replies)
Discussion started by: LilyClaro
0 Replies
2. UNIX for Advanced & Expert Users
I'm trying to understand better the while and until loops, can someone help me with this example?
#!/bin/bash
# Listing the planets.
for planet in Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto
do
echo $planet # Each planet on a separate line.
done
echo; echo
for... (3 Replies)
Discussion started by: jose2802
3 Replies
3. Shell Programming and Scripting
My apologies for the long post....
I have a structure problem with my ksh script on linux.
right now it does what i want (which i know is the point) but its really really ugly and i know there must be a simpler way to achieve my task.
The data is a list of usernames. This list will help... (2 Replies)
Discussion started by: maverick72
2 Replies
4. Shell Programming and Scripting
Hi All
I have some directories on our server which are containing .csv files. i need to print value of cell "B2" from those csv files. Please advise.
I have tried head command as example: head -2 */Book_Collection_Report_1_-_Collection_Requests_trials.csv | sed -n "3p" | awk -F","... (4 Replies)
Discussion started by: yash1978
4 Replies
5. Shell Programming and Scripting
Hi everyone,
I have been a big fan here since a couple years (since I started being an admin ...) and finally decided to become a member and help ppl and perhaps being helped
Now I have a problem that might interest some of the gurus.
I am abig fan of what I call "one liners". I am trying... (2 Replies)
Discussion started by: plmachiavel
2 Replies
6. Shell Programming and Scripting
I am trying to do ftp of some crt files that have spaces in the file names. I have to do approximately 4500 files ftp'ed and then check whether the trasnfered file size matches the source files. This has to be in a loop I mean
1. ftp the file, check for file size whether the source and target... (0 Replies)
Discussion started by: dsravan
0 Replies
7. UNIX for Dummies Questions & Answers
Hi,
how can I use "for" to have two loops :
this is my script :
for i in (A B C)
do
for j in (a b c)
do
echo $i$j
done
done
#End
I want to print out
Aa
Ab
Ac ....
But I have error message :
syntax error at line 1 : `(' unexpected
Many thanks before.
How should I use "for" ?? (2 Replies)
Discussion started by: big123456
2 Replies
8. UNIX for Dummies Questions & Answers
I'm trying to create a loop that will prompt the user for 15 values, not forcing them to enter all 15. If the user enters through one or more of the prompts the null value needs to be converted to 0, otherwise set the parameter = to the value entered:
ex.
Please enter file no #1: 17920
... (4 Replies)
Discussion started by: vdc
4 Replies
9. Shell Programming and Scripting
I am running on HPUX using ksh.
I have a script that uses a loop within a loop, for some reason the script seems to hang on a particuliar record. The record is fine and hits the condition in Blue. If I kill the 1st loop process the script continues on with no problem.
Begin code>
<Some... (8 Replies)
Discussion started by: bthomas
8 Replies
10. UNIX for Advanced & Expert Users
Can anybody help please.
I am trying to right a script which will loop until a certain action has been performed. For example i current have two batch jobs i would like to put into a wait status. Batch Jobs A and B . The script i am trying to get to work is below.
jobs="A B"
COUNT=0
while... (2 Replies)
Discussion started by: mariner
2 Replies