Sponsored Content
Top Forums Shell Programming and Scripting In the script I get additional file, which I don't expect do get Post 302993830 by Don Cragun on Tuesday 14th of March 2017 08:39:48 PM
Old 03-14-2017
Quote:
Originally Posted by digioleg54
... ... ...

---------- Post updated at 07:42 PM ---------- Previous update was at 08:18 AM ----------

Do I understand correctly, that you will not help me with this issue?
No! What you should understand is that I asked you 6 questions in post #2 in this thread and you have still only answered two of those questions.

Your code has lots of echo statements in it. You have not shown us the output produced by any of those echo statements (which might help us understand what your code is seeing while it is running).

We have suggested that you should trace the execution of your script and show us the output produced. You have chosen to keep us in the dark and not provide us with that information.

You have stated that your log file contains the text:
Code:
we are working on *.20170311.*txt files

but we can look at the code that you have shown us and unequivocally state that that message was not produced by the code you have shown us.

If we:
  • don't know what is in the files your code is processing,
  • don't know what code you are running,
  • don't know how you are running your code,
  • and don't know what output your code is producing while it is running,
there isn't much that we can do to help you. If you would like to:
  • answer our questions,
  • show us a representative sample of the contents of the files your code is processing,
  • show us the actual code that you are running when processing the data samples you show us,
  • show us the output that is produced by your code when processing the data samples you show us,
  • and run your code with tracing enabled and show us the trace output,
then we might be able to help you track down your problem.

We aren't sitting at your terminal. We can't see the code you are running. We can't see the files that your code is processing. We can't see the output produced by your code. We don't have the data that you have so that we can figure out what your code might do (even if we try to run your code on our own systems). Only you have that information and you have chosen not to help us help you.

We would love to help you, but you have chosen to hide the information from us that we need to be able to help you. Please help us help you.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run expect script in systems that don't support it out of box

Noob question .. My Java based application needs to change some user passwords based on some user actions. Since this application can run on Redhat AS2.1 / AS4.0 / Solaris 9 etc, the most safe and portable solution that I could think of was: Use expect. Now, expect is not available on all... (1 Reply)
Discussion started by: namityadav
1 Replies

2. Shell Programming and Scripting

input from a file into an expect script ?

Hi, I have an expect script that logs into a host (via ssh) requests the hostid then exits... I am happy with that. However how can I run the same script in a kind of 'while read line' and enter lots of hosts? My knowledge is still very limited (as you will soon see) so any other ideas would... (2 Replies)
Discussion started by: starsky
2 Replies

3. Shell Programming and Scripting

strange expect script behavior, or am i misunderstanding expect scripting?

Hello to all...this is my first post (so please go easy). :) I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed.... (2 Replies)
Discussion started by: v1k0d3n
2 Replies

4. UNIX for Dummies Questions & Answers

Expect Script - While file exist

Hi: Can anyone help me with the while loop in expect script. Following is my scenario: 1. one of my process is running and looking for a file 2. as soon as the file is dropped the proces then processes the file and creates a control file ".ctl" to indicate end of process for that file ... (5 Replies)
Discussion started by: skal5
5 Replies

5. Shell Programming and Scripting

Need help with Expect script for Cisco IPS Sensors, Expect sleep and quoting

This Expect script provides expect with a list of IP addresses to Cisco IPS sensors and commands to configure Cisco IPS sensors. The user, password, IP addresses, prompt regex, etc. have been anonymized. In general this script will log into the sensors and send commands successfully but there are... (1 Reply)
Discussion started by: genewolfe
1 Replies

6. Programming

Calling expect script inside another expect

Hi, Am very new to expect scripting.. Can You please suggest me how to call an expect script inside another expect script.. I tried with spawn /usr/bin/ksh send "expect main.exp\r" expect $root_prompt and spawn /usr/bin/ksh send "main.exp\r" expect $root_prompt Both... (1 Reply)
Discussion started by: Priya Amaresh
1 Replies

7. Programming

Calling another expect script inside an expect script

I have an expect script called remote that I want to call from inside my expect script called sudoers.push, here is the code that is causing me issues: set REMOTE "/root/scripts/remote" ... log_user 1 send_user "Executing remote script as $user...\n" send_user "Command to execute is: $REMOTE... (1 Reply)
Discussion started by: brettski
1 Replies

8. Shell Programming and Scripting

AIX -/usr/bin/expect shows output Don't know why.

Hi, I have been programming with the expect program for a while now and have create a series of menu driven checks for the operations team. One thing I have noticed is that I call a remote script and pass parameters and this is display on the screen....for example. Within the script ... (0 Replies)
Discussion started by: yakky
0 Replies

9. Programming

Expect script returning string following a found expect.

I'm fairly new to scripting so this might not be possible. I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version: #show version ... (0 Replies)
Discussion started by: IBGaryA
0 Replies

10. Red Hat

Script creates additional file

Hi, I have created a test script like this : # cat script1.sh DAY=$(date +%d) MONTH=$(date +%b) YEAR=$(date +%Y) BC01="Blast_BC01" BC15="Blast_BC15" DIR1="$MONTH$YEAR_$BC01" DIR2="$MONTH$YEAR_$BC07" DIR3="$MONTH$YEAR_$BC15" if ;then mkdir -p "$YEAR/$DIR3" fi # When I... (5 Replies)
Discussion started by: anaigini45
5 Replies
All times are GMT -4. The time now is 01:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy