10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have an array in an external file, "array.txt", which contains:
char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies
2. Shell Programming and Scripting
Hello guys.
I need some help. First of all, sorry about my english, that is not my native languaje.
I have a bash script in Solaris with the next lines:
And the sftp.sh has this:
The problem is that sometimes the sftp takes a long of time. I mean, 2 or 3 hours when it should... (12 Replies)
Discussion started by: giolita25
12 Replies
3. Shell Programming and Scripting
Good Morning,
I have a log file on a solaris 9 machine that gets appended this way:
printf "\nBlahBlahBlah - $TIME"
but it doesn't create a new line. I have to go into the file and split the bottom line up manually. Any ideas why \n isn't doing what I want? (5 Replies)
Discussion started by: Stellaman1977
5 Replies
4. Programming
Dear All
I am having following python script.
def read_output(file):
inp=open(file, "r")
row=map(lambda x: x.split(), inp.readlines())
line=
for r in row:
f1, f2, f3, f4, t = r, int(r), r, int(r), float(r)
line.append((f1,... (1 Reply)
Discussion started by: bala06
1 Replies
5. Shell Programming and Scripting
I trying to make a simple script to get info from remote servers my problem is the output of this line-
SERVER_NAME=`ssh -t $USER@$REMOTESERVER 'hostname'`the output is
linux1^M
I would like to remove the ^M
where is my error?
Many Thanks
-Steve (1 Reply)
Discussion started by: shoodlum
1 Replies
6. Shell Programming and Scripting
I have a script below that goes to the given directory and plays the newest powerpoint presentation via powerpoint viewer and wine.
So far it works perfectly but now Id like to add a while statement to essentially run find /ticker/powerpointshare -mmin -1 -type f -iname "*.ppt" and if it finds a... (9 Replies)
Discussion started by: binary-ninja
9 Replies
7. Shell Programming and Scripting
I need some help with adding lines to file and substitute a pattern.
Ok I have a file:
#cat names.txt
name: John Doe
stationed: 1
name: Michael Sweets
stationed: 41
.
.
.
And would like to change it to:
name: John Doe
employed
permanently
stationed: 1-office (7 Replies)
Discussion started by: hemo21
7 Replies
8. Shell Programming and Scripting
Hi....
i have two scripts called:
"type" & "selecttype".
In "type" i have only the name of the products ex.: product1 & product2. Now, i have to ADD product3 which includes sub categories: productA, productB, productC, productD, productE, productF. so my New type script (menu) looks as... (1 Reply)
Discussion started by: Netrock
1 Replies
9. Shell Programming and Scripting
I'm pretty new to bash shell scripting and I was wondering how to add some logging to a script?:confused: (2 Replies)
Discussion started by: kp400sf
2 Replies
10. Shell Programming and Scripting
Hi Expert,
I need to run some command 5 times with 5 mins interval whenever one of the application on server hang.
Can I use below scripts ?
Thanks!
-------------
#!/bin/sh
command1
sleep 300
command2
sleep 300
command3
sleep 300
command4
sleep 300
command5
sleep 300... (2 Replies)
Discussion started by: skully
2 Replies