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 7006945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:32:33+00:00 2026-05-27T21:32:33+00:00

find `pwd` -type f -name *.ksh -exec grep -H .ksh ‘{}’ \; -print 2>/dev/null

  • 0
find `pwd` -type f -name "*.ksh" -exec grep -H ".ksh" '{}' \; -print 2>/dev/null

On Executing this command , the result is

/home/edwprod/Partner_com/bin/edw_etl_job_load.ksh:# Program Name :     edw_etl_job_load.ksh
/home/edwprod/Partner_com/bin/edw_etl_job_load.ksh
/home/edwprod/Partner_com/bin/exec_housekeep_main.ksh:# Program Name     :  exec_housekeep_main.ksh
/home/edwprod/Partner_com/bin/exec_housekeep_main.ksh:# Called program   :  exec_housekeep.ksh
/home/edwprod/Partner_com/bin/exec_housekeep_main.ksh:#!/bin/ksh
/home/edwprod/Partner_com/bin/exec_housekeep_main.ksh:    nohup ${SHELL_DIR}/exec_housekeep.ksh ${ROOT_ID} ${PLAN_ID} ${P_ACTION} ${LVL} &
/home/edwprod/Partner_com/bin/exec_housekeep_main.ksh
/home/edwprod/Partner_com/bin/retrive_pwd_edw.ksh:#        echo "  USAGE=> filename.ksh appl_schema"
/home/edwprod/Partner_com/bin/retrive_pwd_edw.ksh
/home/edwprod/Partner_com/bin/exec_pr_truncate_hkp.ksh:# Program Name     :  exec_pr_truncate_hkp.ksh
/home/edwprod/Partner_com/bin/exec_pr_truncate_hkp.ksh:# Calling program  :  exec_pr_truncate_hkp.ksh
/home/edwprod/Partner_com/bin/exec_pr_truncate_hkp.ksh
/home/edwprod/Partner_com/bin/exec_pr_post_housekeep.ksh:# Program Name     :  exec_pr_post_housekeep.ksh
/home/edwprod/Partner_com/bin/exec_pr_post_housekeep.ksh:# Calling program  :  exec_pr_post_housekeep.ksh
/home/edwprod/Partner_com/bin/exec_pr_post_housekeep.ksh

The command searches all the shell scripts and find the name of scripts being called inside. I need to exactly fetch the ksh name alone from this result. Please help on this?

  • 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-05-27T21:32:34+00:00Added an answer on May 27, 2026 at 9:32 pm

    You could give this a shot (-E is for extended regex, -o is for the output only matching pattern):

    find `pwd` -type f -name "*.ksh" -exec grep -E -o "[a-zA-Z0-9_]*\.ksh" '{}' \;
    

    To get a unique list:

    find `pwd` -type f -name "*.ksh" -exec grep -E -o "[a-zA-Z0-9_]*\.ksh" '{}' \; |sort -u
    

    Hope this helps!

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

Sidebar

Related Questions

find . -type f -print prints out ./file1 ./file2 ./file3 Any way to make
i can find all link in dir by command: find . -type l But
I often use this list command in Unix (AIX / KSH): ls -Artl It
find ./dir -type f -iname *.t[argz]*[bz2] -print | xargs mv --target-directory=dir seems to fail
this one isn't a dev question but silly tech quesiton... I had installed oracle
Could someone take a look at this code and find out what's wrong with
I have been trying to find a solution to this for some time. I
find -L / -samefile /path/to/file -exec ls -ld {} + What does the {}
Find and replace scope can be limited like this: :16,256s/search_term/replacement/gc I don't want to
i am trying to capture the return value of simple command: i.e: pwd where

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.