10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Very new to the Korn Shell, but I've been looking up loops online and it seems this should work. I'm just trying to convert an ip range in variables $A and $B and iterate the individual ip's out to new lines. Unfortunately I get {152..155} instead of 152, 153, 154, and 155.
# for i in {$A..$B};... (8 Replies)
Discussion started by: Azrael
8 Replies
2. AIX
I have a script that loops through a list of users to list files owned by these users
for u is `cat users.list`
do
echo $u >> result.out
find /home -user $u >> result.out
find /var -user $u >> result.out
find /opt -user $u >> result.out
find /usr -user $u >> result.out
done
an so... (3 Replies)
Discussion started by: Dardeer
3 Replies
3. Shell Programming and Scripting
#!/bin/bashi
function userrecord() {
read -p "please enter a number: " a
clear
output=$(grep -w "$a" appraisalrecord)
b=$(echo $a | tr -dc )
if ]; then
echo -e "accepted\n"
else
echo -e "The input must be a numerical number\n"
userrecord
fi
if ]; then
echo -e "the ID has... (2 Replies)
Discussion started by: bassmasta1
2 Replies
4. Shell Programming and Scripting
Hi all,
i got 2 text file.
file.txt
value.txt
i want use C shell script to write out
while both of the file got different limit....how i going to write it in 1 while loop? (4 Replies)
Discussion started by: proghack
4 Replies
5. Shell Programming and Scripting
Ok, don't ask me why, but all calls to perl must be called by a shell script. Its really not ideal, but its what I have to work with.
Calling it isnt the issue, its passing in the arguments.
I have about 1000 perl scripts to call by a shell script. Right now, I'm executing the shell script... (3 Replies)
Discussion started by: regexnub
3 Replies
6. UNIX for Dummies Questions & Answers
for i in `seq 1 10 ` ; do
printf $i '\n';
done
gives me this:
1234567891064mbarch ~ $ (output followed by bash prompt) :(
I've tried so many ways to create a newline at the end. Does anyone have any ideas.. Thanks in advance. Sorry (7 Replies)
Discussion started by: 64mb
7 Replies
7. Shell Programming and Scripting
good afternoon forums.
i have a problem that ive been trying to work out all morning and cant seem to get my head around it.
what i have in my script is individual letters saved in different variables. so if the word unix was saved then 'u' would be stored in the variable 'wvar1' 'n' in 'wvar2'... (7 Replies)
Discussion started by: strasner
7 Replies
8. Shell Programming and Scripting
Hi guys,
I'm trying to loop through a number of files that is set by whatever is in a field.
eg.
The idea is to split FILELIST down into fields, it could contain 1 - 999 fields and it's bar delimited.
I thought simple, count the number of fields in the field and then loop... (1 Reply)
Discussion started by: Peejay
1 Replies
9. Shell Programming and Scripting
I have a problem validating my script. The start of my script begins like this:
then after this i have all of my script and functions.
at the end i close the loop with this code:
What i want to know is, how do i make the loop so that only Yes or no can be an answer?
and if... (7 Replies)
Discussion started by: amatuer_lee_3
7 Replies
10. Shell Programming and Scripting
Here it wont terminate unless i take the not of my statement
#!/bin/bash
grabXML
parseXML
TAIL=5
#"$(cat dailyCasLog | tail -n 1)"
COUNT=200
LINE=5
#"$(cat dailyCasLog | head -n $COUNT | tail -n 1)"
echo $TAIL
echo $LINE
while ($LINE!=)
do
#$LINE">>currentLine
folderMaker
... (0 Replies)
Discussion started by: rcunn87
0 Replies