Tags: %TAGME{ tpaction="" web="Lab" tag="" }%
view all tags
---+ Overview This page is designed to give minor examples, and general principles for renaming multiple files at once from the command line based on given criteria and wildcards. Makes use of a command line for loop and the sed command. ---+ Renaming multiple fastq files 1 Assume you have downloaded multiple fastq files which are of format: Samplename-Lane-runID-etc-etc.fastq 1 for file in *.fastq;do new_name=$(echo $file|sed 's/-*//'); mv $file $new_name;done * Generic explanation: * for "variable name" in "files to consider"; do "new variable name"=$(echo $"variable name"|sed 's/what to find/what to replace/');mv $"new variable name" $"variable name";done -- Main.DanielDeatherage - 21 Aug 2014
Edit
|
Attach
|
P
rint version
|
V
iew topic
|
B
acklinks
|
H
istory
:
r6
|
r4
<
r3
<
r2
<
r1
|
Refresh
|
More topic actions...
Topic revision: r1 - 2014-08-21
-
DanielDeatherage
Barrick Lab
Homepage
Contact Information
Michigan State University
Department of Microbiology, Genetics, & Immunology
Department of Entomology
Ecology, Evolution, and Behavior Graduate Program
UT Austin iGEM team
Team
Research
Overview
Publications
Software
Protocols
Protocol List
Reference Information
The LTEE
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback