10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
I'm working on a script that will actually read a file consisting of data like the below:(ReportID,Sub_reportID,Sub_reportName)
1,1,ABC
1,2,DEF
1,3,GHI
2,1,JKL
2,2,MNO
3,1,PQR
I want to read the Sub Report details for a Report_ID using while loop and write these values into... (6 Replies)
Discussion started by: venkat_reddy
6 Replies
2. Programming
Hello,
I'm trying to read the variable "pause" from a for loop without luck. The function is dependant on the outcome of the test within the loop. If i run this, pause is always 0 within the function. Any ideas?
Thanks.
pause=0
users=1
(for (( ; ; ))
do
speed=`cat speed.log`
... (7 Replies)
Discussion started by: shadyuk
7 Replies
3. Solaris
I'm posting here as it didn't seem quite right in the hardware section (as it's LOM commands). My apologies if I have that wrong though :)
I've finally gotten round to configuring the LOM on my Netra X1, but I can't get it to change the hostname via the "set" command:
lom>show hostname... (2 Replies)
Discussion started by: Smiling Dragon
2 Replies
4. Shell Programming and Scripting
Hello All,
Hope you can understand my problem from the below code.
$ cat ~/.profile
PS1=`whoami`@`hostname`':$PWD
$ '
export PATH="$PATH:.:/logarchive/utility/util:/usr/sbin:"
$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/usr/sbin:
$ echo $SHELL
/usr/bin/ksh
... (6 Replies)
Discussion started by: sathyaonnuix
6 Replies
5. Shell Programming and Scripting
Hi;
For sure there's an easy answer to this one that I am not finding..
I first set a variable, say
b1a:] max=5
then I want to use max to set the range for a for loop like so (it should run for i in 1:5)
b1a:] for i in {1..$max}; do echo $i; done
{1..5}
I would like the output... (2 Replies)
Discussion started by: jbr950
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
My team does not have root access however many a times my members logon to the unix server and fire the rm command mistakenly on wrong folder and later realise that they have made a mess.
The rm -i option prompts for a confirmation before actually deleting the files/folders.
I want to... (5 Replies)
Discussion started by: shifahim
5 Replies
7. Shell Programming and Scripting
I am unable to access the value set inside the loop from outside loop .
Thought of taking this to forum , I had seen other replies also , where a pipe takes the execution to another shell and mentioned thats the reason we do not get the variable outside loop . But I am getting an issue and I am... (1 Reply)
Discussion started by: Armaan_S
1 Replies
8. Shell Programming and Scripting
I have a while loop like this
cat ${filename} | while read fileline
do
...
done
I need to access a variable value $newfile inside this while loop
How will i do that?? (6 Replies)
Discussion started by: codeman007
6 Replies
9. Shell Programming and Scripting
Dear All,
Can anyone advise why this script isn't run as expected?
===========================
status=0
cat /etc/passwd |
while read line; do
status=1
done
echo $status
===========================
it always return 0 , but not 1. why?
anything wrong?
Thanks. (1 Reply)
Discussion started by: tiger2000
1 Replies
10. Shell Programming and Scripting
In ksh I thought a global variable was any variable in a script or function that did not have the typeset command. I have a global in my calling script which I increment in a function, but the value does not change in the calling script. Here is the code:
function f_open_log
{
typeset -r... (5 Replies)
Discussion started by: robotball
5 Replies