10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a shell script which has this while loop line
"while read tblName xx; do..."
I understand how while loop works but don't know what does this xx stands for? (1 Reply)
Discussion started by: later_troy
1 Replies
2. UNIX for Dummies Questions & Answers
can some one please tell me what is the problem with my syntax:confused:
I have 100 files in one folder
1. want to read each of the line by line
2. calculate their number of the words between the first word and the last word of each line
3. create file for each file with number of words... (8 Replies)
Discussion started by: A-V
8 Replies
3. Shell Programming and Scripting
Hi there
As part of a larger script I need to put the output of an ls into a variable which has an incremental number.
ie
nathan@nathan-Vostro-1700:~$ eval 'proc'$val='`ls -ld /proc/9467`'
nathan@nathan-Vostro-1700:~$ echo $proc0
dr-xr-xr-x 8 nathan nathan 0 2012-05-02 09:21... (3 Replies)
Discussion started by: nathan.harris
3 Replies
4. Shell Programming and Scripting
Hi there
I am really struggling :eek: to place a value in a variable with the following loop, having run out of ideas please can someone point me in the right direction?
We first read two PIDs of a program (say calc) into an array, then we loop reading the details of those processes into a... (6 Replies)
Discussion started by: nathan.harris
6 Replies
5. Shell Programming and Scripting
I am trying to run a menu option though IF loops. I keep getting errors not allowed the menu to be processed correctly. Currently it will accept the first 2 statements but then crash on the 3rd. The 2nd and 3rd have the same syntax, so I do not understand why it breaks.
#!/bin/bash
while... (4 Replies)
Discussion started by: Ironguru
4 Replies
6. UNIX for Dummies Questions & Answers
%%%%% (3 Replies)
Discussion started by: lucasvs
3 Replies
7. Shell Programming and Scripting
hi,
I have to use for loop in my script. The below code is providing an output,
1,2,3,4,5..n. But i need to display the values one by one eg: it has to display the first value then exit from the loop and display the second value then exit till n(last value).
for i in 1,2,3,4,5..n
do ... (2 Replies)
Discussion started by: sreelu
2 Replies
8. Shell Programming and Scripting
I'm an experienced programmer that is new to shell scripting. I'm putting together a shell script that erases all files of a certain age. These files are in directories provided on lines of a file that is provided via command line argument and takes any errors(permissions, etc) and emails them to a... (3 Replies)
Discussion started by: drew2002
3 Replies
9. Shell Programming and Scripting
Hi everyone,
Can ny1 help me out regarding while loop arguments
i.e. what does
-gt
-ge
-lt
-le
means?
actually i am new to while loops (2 Replies)
Discussion started by: jojo123
2 Replies
10. Shell Programming and Scripting
i don't get what's wrong here. i'm writing a shell script that takes 1 argument (a number) from the command-line, but it's throwing an error:
Syntax error: Bad for loop variable
doesn't make much sense
for (( i = 1; i = ${1}; i++ )) # error points to this line everytime
do
echo... (9 Replies)
Discussion started by: visitorQ
9 Replies