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

  • Home
  • SEARCH
  • 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 8907863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:01:30+00:00 2026-06-15T03:01:30+00:00

Basically my question is how to use bash shell command to do following automatically,

  • 0

Basically my question is how to use bash shell command to do following automatically, so I can track modified files easily.

  1. list svn check-out files
  2. create link files to above files in an directory called “change”

laptop$ svn status -q

M            rcms/src/config/ta_show.c
M            rcms/src/config/ta_config.c

laptop$ cd  change
laptop$ link -s ../rcms/src/config/ta_show.c ta_show.c
laptop$ link -s ../rcms/src/config/ta_config.c ta_config.c

laptop$ ls
lrwxrwxrwx 1 root root 59 Nov 27 12:24 ta_show.c -> ../rcms/src/config/ta_show.c
lrwxrwxrwx 1 root root 59 Nov 27 12:24 ta_config.c -> ../rcms/src/config/ta_config.c

I am thinking to use shell command like below:

$ svn status -q | sed 's/M       //' | xargs -I xxx ln -s ***BETWEEN REAL FILE AND BASE FILENAME***
  • 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-15T03:01:31+00:00Added an answer on June 15, 2026 at 3:01 am

    you have two things need to be concerned:

    • the empty line between each file with svn status ‘M’
    • extract the file name

    the awk one liner could do it:

    awk '$0{x=$2;gsub(".*/","",x);print "ln -s ../"$2" "x}'
    

    so if you pipe your svn status output to the line above, it print the ln -s command lines for you.

    if you want the ln -s lines to get executed, you could either pipe the output to sh (svn status|awk ...|sh) or replace the print with system

    at the end i would like to show the output below as an exmple:

    kent$ echo "M            rcms/src/config/ta_show.c
    
    M            rcms/src/config/ta_config.c"|awk '$0{x=$2;gsub(".*/","",x);print "ln -s .."$2" "x}'
    ln -s ../rcms/src/config/ta_show.c ta_show.c
    ln -s ../rcms/src/config/ta_config.c ta_config.c
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

SHORT VERSION OF QUESTION: So basically my question is: How can I set the
I can provide more detail if necessary, but my question is basically thus: If
Question basically as in the title. I could use c/c++/objective-c. I would like to
Basically the question is how do I run gpgpu code in a Metro app.
Basically my question is the exact same one as this: Simple client/server, TCP/IP encrypting
Basically the question could more probably be more accurately asked, how do I simply
Basically the question is, Why are NONE of the changes I've been making in
Basically my question is i have a website which was developed around 3 years
This is basically the same question as Click items in select box, and then
Today I stumbled upon this thread: http://www.mathworks.com/matlabcentral/newsreader/view_thread/112560 The question is basically how to make

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.