Sponsored Content
Top Forums Shell Programming and Scripting Create a list of files from alias by script Post 303015258 by RudiC on Saturday 31st of March 2018 12:34:50 PM
Old 03-31-2018
OK, let's try our luck. How about
Code:
awk -vSRC="/pictures/" -vTGT="/pictures/alias/" -vDQ='"' 'gsub (/<0(1|2)>/, _) {ORG = $0; next} {print "cp " DQ SRC ORG DQ, DQ TGT $0 DQ}' file4
cp "/pictures/CBS.png" "/pictures/alias/cbs.png"
cp "/pictures/CBS.png" "/pictures/alias/CBS HD.png"
cp "/pictures/CBS.png" "/pictures/alias/CBS SD.png"
cp "/pictures/CBS.png" "/pictures/alias/CBS HD +1.png"
cp "/pictures/Disney Channel.png" "/pictures/alias/DISNEY CHANNEL.png"
cp "/pictures/Disney Channel.png" "/pictures/alias/DISNEY CHANNEL HD.png"
cp "/pictures/Fox.png" "/pictures/alias/FOX.png"
cp "/pictures/Fox.png" "/pictures/alias/FoX.png"
cp "/pictures/Fox.png" "/pictures/alias/FOX HD.png"
cp "/pictures/Fox.png" "/pictures/alias/FOX FHD.png"
cp "/pictures/Fox.png" "/pictures/alias/FOX FHD.png"
cp "/pictures/Fox.png" "/pictures/alias/Fox +1 HD.png"
cp "/pictures/Fox.png" "/pictures/alias/Fox +2 HD.png"

If happy with the result pipe it through sh to make it really happen...
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Create a list of files that were modified after a given date.

Hello Mates! I'm kinda new to unix and need to a solve a problem. Input: date Situation: With the given date I need to find a list of all such files starting from a given path that were modified after the given date. I experimented with the "find" with "-newer" but did not quite get it... (4 Replies)
Discussion started by: rkka
4 Replies

2. Shell Programming and Scripting

Shell Script Create List of Deleted Files

Hi, I want to put all the deleted files in a txt file. Because i want to backup my image server which has thousands of jpg images. I wrote a shell script which will copies images from image server to backup image server. I setup a cronjob which runs on every five minutes. & through timestamp it... (8 Replies)
Discussion started by: mirfan
8 Replies

3. Shell Programming and Scripting

How to create multiple list of files in a directory ?

Hi, i have say 100 files in a directory. file1.log file2.log file3.log file4.log file5.log file6.log ... ... ... file99.log file100.log ========= I need to create another file which contains the list of al these log files. each file should contain only 10 log file names. it shud... (4 Replies)
Discussion started by: robinbannis
4 Replies

4. Shell Programming and Scripting

Create files from a list and then populate them

I have a list of filenames that I want created - they must be created via a certain naming convention due to the software I'm using. Once they are created I have another file that will be used to populate them with data. So far this is what I have: #For each line in text file "foo_txt" create... (2 Replies)
Discussion started by: MaindotC
2 Replies

5. Shell Programming and Scripting

Create an alias

I want to create an alias cpage4 and create a postscript file For example I want to call cpage4 file.f which creates the file file.ps I have written like this but don't know how to continue alias cpage4 '/usr/bin/mpage -m40 -4AHP- \!* (6 Replies)
Discussion started by: kristinu
6 Replies

6. UNIX for Dummies Questions & Answers

Create alias files (not alias commands)

If one: $ find -name 'some expression' -type f > newfile and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory. I am... (3 Replies)
Discussion started by: Alexander4444
3 Replies

7. Shell Programming and Scripting

Create empty files from a list on file

Hello Guys. Please I would like to create empty files from a list In file1 will be the followin values, so i will like to create for each name a empty file. file1 2191off-r0.sps 2192off-r0.sps 2193off-r0.sps 2194off-r0.sps 2195off-r0.sps So I need to get 5 empty files. Thanks for... (7 Replies)
Discussion started by: jiam912
7 Replies

8. Shell Programming and Scripting

Create a list of missing files

Hello Guys I have a big list of files in one directory. And Some are missing . Example ls -l 2191off-r0.sps 2193off-r0.sps 2194off-r0.sps 2197off-r0.sps 2198off-r0.sps 2200off-r0.sps I would like to create a file with the list only missing files. Or if is possible to create in ... (4 Replies)
Discussion started by: jiam912
4 Replies

9. Shell Programming and Scripting

Script or alias to backup all files opened by vi

we want to backup all opened files by vi before editing also with version information. i wrote below alias to backup crontab file content with version info. What i want know is to make this opened files by vi. We want to prevent user mistakes by adding this alias. alias crontab='DATE=$(date... (4 Replies)
Discussion started by: sebu
4 Replies

10. Shell Programming and Scripting

Scan directories and create a list of files

Gents, Please can you help. I want to create a list which contends the complete patch of the location of some directories with the size of each file. need to select only .txt file In this case I am try to find the subdirectories tp1 and tp2 and create the output list. jd175-1 tp1... (3 Replies)
Discussion started by: jiam912
3 Replies
SDL::Cursor(3)						User Contributed Perl Documentation					    SDL::Cursor(3)

NAME
SDL::Cursor - a SDL perl extension SYNOPSIS
$cursor = SDL::Cursor->new( -data => new SDL::Surface "cursor.png", -mask => new SDL::Surface "mask.png", -x => 0, -y => 0 ); $cusor->use; DESCRIPTION
the SDL::Cursor module handles mouse cursors, and provide the developer to use custom made cursors. Note that the cursors can only be in black and white. METHODS
new( -data => $surface_data, -mask => $surface_mask, x => $x, y => $y) Creates a new cursor. The <C>-data</C> and <C>-mask</C> parameters should be both black and white pictures. The height and width of these surfaces should be a multiple of 8. The <C>-x</C> and <C>-y</C> are the coordinates of the cursor 'hot spot'. warp($x, $y) Set the position of the cursor at the <C>$x</C>, <C>$y</C> coordinates in the application window. use() Set the cursor as the active cursor. get() When used statically <C>SDL::Cursor::get()</C>, it will return the instance of the current cursor in use. Called as a method, it will return itself. This method can be useful if you are dealing with several cursors. show($toggle) Set the visibility of the cursor. A false value will make the cursor invisible in the Application window. A true value will show it back. AUTHOR
David J. Goehrig SEE ALSO
perl SDL::Surface perl v5.12.1 2010-07-05 SDL::Cursor(3)
All times are GMT -4. The time now is 04:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy