9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
My requirement is to add a specific line in a file after a certain line that contains 'setenv'
the existing code is like
setenv SEQFILES "/ConvWrk/inteng03/alltars/bnymais1"
LIBDEF scope='JOB' type='PGM' dataset='SUNAR.PJ90000P.JOBLIB'... (5 Replies)
Discussion started by: gotamp
5 Replies
2. Shell Programming and Scripting
I have a shell script that looks something like the following:
mysql -uroot db1 < db1.sql
mysql -uroot db2 < db2.sql
mysql -uroot db3 < db3.sql
mysql -uroot db4 < db4.sql
....
different db names in more than 160 lines.
I want to run this script with nohup and have a status later.
So,... (6 Replies)
Discussion started by: MKH
6 Replies
3. Shell Programming and Scripting
I'm trying to stop reading a file until the end of the file is reached or a defined delimiter line is reached. Some how I need to test the fail state of the last 2 commands, not just the last command.
echo -e "hello\ngoodbye\n####\ntesting" | while read line; ]; do echo "$line"; done
hello... (4 Replies)
Discussion started by: Michael Stora
4 Replies
4. Shell Programming and Scripting
I started venturing in learning the art of using AWK/GAWK and wanted to simply added a period from line #11 to line #28 or to the end of the file if there is data. So for example:
11 Centos.NM
12 dojo1
13 redhat.5.5.32Bit
14 redhat.6.2.64Bit... (5 Replies)
Discussion started by: metallica1973
5 Replies
5. Shell Programming and Scripting
Hello Everyone,
I need a help from experts of this community regarding one of the issue that I am facing with shell scripting.
My requirement is to append char's at the end of each line of a file. The char that will be appended is variable and will be passed through command line.
The... (20 Replies)
Discussion started by: Sourav Das
20 Replies
6. Programming
Here is the program I am trying to debug:
#include <stdio.h>
int i = 5;
int main(void)
{
int x = 3;
display(x);
return 0;
}
void display(int x)
{
for ( i=0; i<x; ++i ) {
printf("i is %d.\n", i);
}
}This code is coming from here Peter's gdb Tutorial: Stepping... (2 Replies)
Discussion started by: ijustneeda
2 Replies
7. Shell Programming and Scripting
Hi all,
using VI, can anyone tell me how to add some characters onto the end of a line where the line begins with certain charactars eg
a,b,c,.......,
r,s,t,........,
a,b,c,.......,
all lines in the above example starting with a,b,c, I want to add an x at the end of the line so the... (6 Replies)
Discussion started by: satnamx
6 Replies
8. Shell Programming and Scripting
FIle A
"A" 2 aa 34
3 ac
5 cd
"B" 3 hu 67
4 fg
5 gy
output shud be
A"" 2 aa 34
"A" 3 ac 34
"A" 5 cd 34
"B" 3 hu 67
"B" 4 fg 67
"B" 5 gy 67 (6 Replies)
Discussion started by: cdfd123
6 Replies
9. Programming
Hi All,
I want to find if a certain exe is running and if it is running i want to stop the execution of this exe (the exe has been created by me) on solaris.
What are the unix command i need to use and can i put these comand in a shell script or create a new exe to do this task (i would... (4 Replies)
Discussion started by: zing
4 Replies