Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8596297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:38:34+00:00 2026-06-12T00:38:34+00:00

I am a newb in unix. But i need to understand this code given

  • 0

I am a newb in unix. But i need to understand this code given by client :(. i tried to ask the client details about the code like what the code is supposed to do but he himself has no idea. So basically i am stuck with a code whose purpose i do not know but i have to understand what it does >.<.
This is what i have been able to make out of the code so far( in the form of comments) [1] [2] [3] etc..
I have doubts/no clue for comments number [8] to [12] . for [1] to [7] i feel most are right, but if any are wrong feel free to point out.
A little background : I am supposed to working in teradata and this might be related to it.
My comments are in bold{
*}

#!/usr/bin/ksh  **//[1] sets shell**        
set -x     **//[2]will this show the argument values before execution?**

l=$1       **//[3]$1,$2,$3 are the arguments with which this shell**
h=$2       **//is invoked.l= first argument h= second argument and**
k=$3       **//k=3rd argument.**

/export/home/someguy/daily_refresh/abc_mt_dt.ksh $l $h $k 
           **//[4] calling abc_mt_dt.ksh
             // with arguments l h and k**   

chmod 777 /export/home/someguy/daily_refresh/$k.txt 
           **// making $k.txt a read write n**
           **//executable.This im sure im right** 

while read line
   do
      echo $line |read a b c 
          **// [5] reads three values from keyboard and displays them as     
            //well as storing them in values a b and c**

      DATA_START_DT=$a 
          **// [6] variables DATA_START_DT DATA_END_DT ID set to the three** 
      DATA_END_DT=$b   **// values read from keyboard** 
      ID=$c

      echo $DATA_START_DT **//[7] displaying the values read from keyboard**
      echo $DATA_END_DT
      echo $ID

      rm -rf /export/home/someguy/daily_refresh/logs/abc_$DATA_END_DT.log 

      **//[8] rm -rf is to recursively remove files and folders .. 
          so what will this command do? will it remove all files and folders
          inside /export/home/someguy/daily_refresh/logs/ ?**

      bteq <<EOI > /export/home/someguy/daily_refresh/logs/abc_$DATA_END_DT.log 2>&1 

      **// [9] need explaination as to what this does.**
      .run file = /export/home/someguy/logon_caracal.bteq **//[10]**
      .MAXERROR 1; **//[11]**  
       DATABASE SOME_DATABASE; **//[12]**
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:38:36+00:00Added an answer on June 12, 2026 at 12:38 am

    [8] No, it will not remove all files and folders inside /export/home/someguy/daily_refresh/logs/. It will only delete the file called /export/home/someguy/daily_refresh/logs/abc_$DATA_END_DT.log.

    In [9], the script executes the bteq command.

    << EOI is a here document. All the statements underneath, until the line containing the word EOI, are passed to the bteq program. These are bteq commands, not shell commands. All the output and errors from the bteq program are written to /export/home/someguy/daily_refresh/logs/abc_$DATA_END_DT.log.

    [10] This is the file containing SQL requests and bteq commands which will be processed.

    [11] A MAXERROR of 1 means that bteq will exit if an error level 2 or above occurs during processing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not a newb to JavaScript but this is my first foray into Acrobat
This is a newb question, but it makes me pulling my hairs: <div class=search-input-field>
Total newb to .NET programming (and AJAX) but I've been working on this program
Android newb here. Please use small words :-) I'd like to simulate typewriter output
I apologize for the newb question but have not found a solution online. I
I'm a PHP newb. Sorry if this is an FAQ... Let's say I have
I'm a total newb to LINQ. Here is the code I have so far:
First I'm so newb to iPhone dev and I'm sorry if this is easy.
I am a TDD newb and I would like to figure out how to
Newb question of the day: I'm trying to select all the users with this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.