10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
GM,
I have an issue at work, which requires a simple solution. But, after multiple attempts, I have not been able to hit on the code needed.
I am assuming that sed, awk or even perl could do what I need.
I have an application that adds extra blank page feeds, for multiple reports, when... (7 Replies)
Discussion started by: jxfish2
7 Replies
2. Programming
Hello friends! i am writing a code in which i take inputs (numbers) from user and count the total number of positive, negative and zeros entered. I need to clear my standard input buffer before scanf() command. My compiler is completely ignoring the fflush(stdin) command. its not even showing any... (1 Reply)
Discussion started by: Abhishek_kumar
1 Replies
3. UNIX for Advanced & Expert Users
Hello everyone,
Can someone please explain the input buffer behaviour for the read command in ksh93 on AIX?
I have 'googled' for weeks now, and did not find a satisfactory answer or solution to my dilemma.
I have the following code:
STTY=$(stty -g)
if ;then
stty -echo -icanon time 0 min... (1 Reply)
Discussion started by: gio001
1 Replies
4. Shell Programming and Scripting
Hello "expect" experts
I am new at Expect. I have searched for a little while how to capture multiple lines with Expect and I am almost succeeded on that but I don't get all the lines of a command's output that the script executes on a server.
Here is how my script works in a nutshell -
... (6 Replies)
Discussion started by: capacho6666
6 Replies
5. Shell Programming and Scripting
The following code will split the infile into multiple files. However, I need it to insert the same first 3 lines from the original input file into each splitted file. How do I modify my script below to do so:
print -n "Enter file name to split? " ; read infile
if
then
echo "Invalid file... (4 Replies)
Discussion started by: mrn6430
4 Replies
6. Shell Programming and Scripting
I have one long line text with semicolon used as separator between values in that line. Now, I want to separate the line into multiple line right after every 29th field.
example input line:
... (1 Reply)
Discussion started by: erlanq
1 Replies
7. Shell Programming and Scripting
I have one long line text with semicolon used as separator between values in that line. Now, I want to separate the line into multiple line right after every 29th field.
example input line:
... (2 Replies)
Discussion started by: erlanq
2 Replies
8. Programming
Hi
I want to accept multiple lines input with spaces from User and i have a working code like this.
char sRes;
char sReq;
printf("Please enter request:");
scanf("%",sReq); /* Accept the input from user */
printf("\nPlease enter response:");
scanf("%",sRes);
but the... (4 Replies)
Discussion started by: AAKhan
4 Replies
9. Shell Programming and Scripting
Hi All,
Does anyone know how to read multiple lines from standard input into an array and then iterate a loop for all the lines read. Below is an example pseudocode:
I need the below filenames to be read by the script into an array or something similar:
And then in the script, I... (9 Replies)
Discussion started by: bharath.gct
9 Replies
10. Shell Programming and Scripting
If I am running a cat|awk|sed on a file to get a bunch of numbers between 1 and 500 billion, how can I stay in stream, and still compare "this value" with "the previous value"?
Really I could do this all in Perl, but if I can get it to work in-stream, its gonna be TONS faster... even if I can... (14 Replies)
Discussion started by: jjinno
14 Replies