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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:28:38+00:00 2026-05-30T20:28:38+00:00

I am running cygwin on Windows 7 . I am using a signal processing

  • 0

I am running cygwin on Windows 7. I am using a signal processing tool and basically performing alignments. I had about 1200 input files. Each file is of the format given below.

input_file_ format = “AC_XXXXXX.abc”

The first step required building some kind of indexes for all the input files, this was done with the tool’s build-index command and now each file had 6 indexes associated with it. Therefore now I have about 1200*6 = 7200 index files. The indexes are of the form given below.

indexes_format = “AC_XXXXXX.abc.1”,
“AC_XXXXXX.abc.2”,
“AC_XXXXXX.abc.3”,
“AC_XXXXXX.abc.4”,
“AC_XXXXXX.abc.rev.1”,
“AC_XXXXXX.abc.rev.1”

Now, I need to use these indexes to perform the alignment. All the 6 indexes of each file are called together and the final operation is done as follows.

signal-processing-tool ..\path-to-indexes\AC_XXXXXX.abc ..\Query file

Where AC_XXXXXX.abc is the index associated with that particular index file. All 6 index files are called with **AC_XXXXXX.abc*.

My problem is that I need to use only the first 14 characters of the index file names for the final operation.

When I use the code below, the alignment is not executed.
for file in indexes/*; do ./tool $file|cut -b1-14 Project/query_file; done

I’d appreciate help with 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-30T20:28:39+00:00Added an answer on May 30, 2026 at 8:28 pm

    First of all, keep in mind that $file will always start with “indexes/”, so trimming first 14 characters would always include that folder name in the beginning.

    To use first 14 characters in a variable, use ${file:0:14}, where 0 is the starting string index, and 14 is the length of the desired substring.

    Alternatively, if you want to use cut, you need to run it in a subshell: for file in indexes/*; do ./tool $(echo $file|cut -c 1-14) Project/query_file; done I changed the arg for cut to -c for characters instead of bytes

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

Sidebar

Related Questions

I'm using Ant 1.8.2 on Ubuntu Linux (and also on Windows 7 running Cygwin).
I want to transfer a character device file created using cygwin (running on windows
Setting up new git installations. On one Windows laptop, I'm running (under cygwin): git
I am running a shell script on windows with cygwin in which I execute
Running a rails site right now using SQLite3. About once every 500 requests or
I've been using Cygwin on Windows recently. I want to use the Windows installation
Getting Fatal Error while running bin/hadoop namenode -format Using Windows 7 operating system, Under
running cygwin on windows I can connect and execute X applications with no further
I am currently running Cygwin on a target Windows Server 2003 machine to fire
I am running a Eclipse for C/C++ using cygwin GCC. I need to get

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.