You were pretty close on this. I used a here-string (<<<) piped into a while read block. As we want to change directories in the loop using a sub shell ensures the pwd is reset after each rename loop.
change echo mv in red below to mv if you are happy with what it's doing
This User Gave Thanks to Chubler_XL For This Post:
Hi,
I am having file which contains around 15 columns, i need to fetch column 3,12,14 based on the condition that column 3 starts with 40464
this is the sample data
how to achieve that (3 Replies)
I’m trying to modify someone perl script to fix a bug. The piece of code checks that the zone name you want to add is unique. However, when the code runs, it finds a partial match using grep, and decides it already exists, so the “create” command exits.
$cstatus = `${ZADM} list -vic | grep... (3 Replies)
Hi, I was trying to figure this out but failed so I hope someone here can help me, thank you in advance.
I have two files.
file1: aa M
bb N
cc O
dd P
ee Q file2: aa A_87_P254063
cc A_87_P016532
bb A_87_P104793
dd A_87_P055331
ee A_87_P059706
aa A_87_P071636
ee A_87_P028302... (2 Replies)
Hi I have a question and hope I can get answer here. Thank you in advance.
I have two files:
file1:
aa X
bb Y
cc Z
file2:
cc A
bb B
dd C
aa D
bb E
If the 1st column match in both file1 and file2, the 2nd column in file2 will be replaced by the 2nd column in file1. If there is no... (2 Replies)
I posted the incorrect files yesterday and apologize. I also modified the awk script but with no luck. There are two text files in the zip (name.txt and output.txt). I am trying to match $2 in name.txt with $1 in output.txt and if they match then $1 of name.txt is copied to $7 of output.txt. ... (7 Replies)
I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)
Hi All,
I have 100 folders with the first delimiter has a unique name i.e (123_hello and 575_hello) and each folder have atlist 1000 plus files with naming convention i.e (575_hello_1.iso ... 575_hello_1000.iso).
575_hello/575_hello_1.iso
575_hello/575_hello_2.iso
575_hello/575_hello_3.iso... (8 Replies)
Hi, I have a tab delimited text file like this one. I need to do a partial match of a particular cell and then replace matches with an empty cell. So here is a sample:
Smith FordMustang ChevroletCamaro
Miller FordFiesta
Jones KiaSorrento
Davis ChevroletCamaro
Johnson ToyotaHighlander
I... (4 Replies)
I am trying to create a cronjob that will run on startup that will look at a list.txt file to see if there is a later version of a database using database.txt as the source. The matching lines are written to output.
$1 in database.txt will be in list.txt as a partial match. $2 of database.txt... (2 Replies)
In the portion of bash below I am using rename to match the $id variable to $file and when a match (there will alwsys be one) is found then the $id is removed from each bam and bam.bai in $file and _test is added to thee file name before the extension. Each of the variables is set correctly but... (3 Replies)
Discussion started by: cmccabe
3 Replies
LEARN ABOUT DEBIAN
gnupod_search
GNUPOD_SEARCH(1) User Commands GNUPOD_SEARCH(1)NAME
gnupod_search - search and remove files
SYNOPSIS
gnupod_search [OPTION]...
DESCRIPTION
Search and Remove files
--help display this help and exit
--version
output version information and exit
-m, --mount=DIRECTORY
iPod mountpoint. Default is $IPOD_MOUNTPOINT
-t, --title=STRING
search songs by Title
-a, --artist=STRING
search songs by Artist
-l, --album=STRING
search songs by Album
-i, --id=INT
search songs by ID
-g, --genre=STRING
search songs by Genre
-c, --playcount=COUNT
search songs by Playcount
-s, --rating=STARS
search songs by Rating (1 star = 20, 2 stars = 40 ...)
-R, --podcastrss=RSS
search songs by podcast-rss
-U, --podcastguid=GUID
search songs by podcast-guid
-b, --bitrate=BITRATE
search songs by Bitrate
-o, --match-once
Search does not need to match multiple times (like ($a || $b || $c))
--delete
Remove (!) matched songs from the iPod
--view=ialt
Modify output, default is 'ialt'
t = title a = artist r = rating p = path
l = album g = genre c = playcount i = id
--rename="KEY=VALUE"
Rename KEY into VALUE for matched songs.
Example: Rename the Artist 'Jon Doe' into 'John Doe'
gnupod_search --artist="Jon Doe" --rename="artist=John Doe"
AUTHOR
Written by Adrian Ulrich
REPORTING BUGS
Report bugs to <bug-gnupod@nongnu.org>
COPYRIGHT
Copyright (C) Adrian Ulrich
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for gnupod is maintained as a Texinfo manual. If the info program and GNUpod are properly installed at your site,
the command
info gnupod
should give you access to the complete manual.
gnupod_search 1.00 June 2005 GNUPOD_SEARCH(1)