Sponsored Content
Top Forums Shell Programming and Scripting Turning my lists into useable copy commands Post 302937924 by Scrutinizer on Tuesday 10th of March 2015 03:27:45 PM
Old 03-10-2015
Strange, I get:

Code:
$ awk -F'\t+|  +|:' '{$NF=$1 q " copied"; $1="pause\ncp " q "/Volumes"}1' q=\' OFS=/ file
pause
cp '/Volumes/CX_Media_06/OMFI MediaFiles/zCassie/WA6016_03.A01.D114D54EF9A91.wav' copied
pause
cp '/Volumes/CX_Media_06/OMFI MediaFiles/zCassie/FRK6030_04A01.D11A054F4C480.wav' copied
pause
cp '/Volumes/CX_Media_06/OMFI MediaFiles/zCassie/FRK6029_03A01.D11A054F4C47D.wav' copied
pause
cp '/Volumes/CX_Media_06/OMFI MediaFiles/zCassie/FRK6031_02A01.D11A054F4C481.wav' copied
pause
cp '/Volumes/CX_Media_06/OMFI MediaFiles/zCassie/FRK6032_06A01.D11A054F4C486.wav' copied
pause
cp '/Volumes/CX_Media_06/OMFI MediaFiles/zCassie/FRK6032_04A01.D11A054F4C485.wav' copied
pause
cp '/Volumes/CX_Media_06/OMFI MediaFiles/zCassie/FRK6028_02A01.D11A054F4C47B.wav' copied
pause
cp '/Volumes/CX_Media_06/OMFI MediaFiles/zCassie/FRK6027_03A01.D11A054F4C47A.wav' copied
pause
cp '/Volumes/CX_Media_06/OMFI MediaFiles/zCassie/VI6006_01.A01.D114D54EF9A85.wav' copied
pause
cp '/Volumes/CX_Jeff_Render_01/OMFI MediaFiles/zJeff_AP/R6v0307,Audio Mixdo54FC00E1.wav' copied
pause
cp '/Volumes/CX_Media_06/OMFI MediaFiles/zTommy_AP/Bass_Drop_A01.D10BF54E6B931.wav' copied
pause
cp '/Volumes/CX_Media_06/OMFI MediaFiles/zTommy_AP/Bass_Drop_A02.D10BF54E6B931.wav' copied
pause
cp '/Volumes/CX_Media_06/OMFI MediaFiles/zCassie/R6v0225_BTA01.D118C54F38E42.wav' copied
pause
cp '/Volumes/CX_Media_06/OMFI MediaFiles/zCassie/R6v0225_BTA02.D118C54F38E42.wav' copied


Code:
$ echo 'R6v0307,Audio Mixdo54FC00E1.wav    CX_Jeff_Render_01:OMFI MediaFiles:zJeff_AP:' |
awk -F'\t+|  +|:' '{$NF=$1 q " copied"; $1="pause\ncp " q "/Volumes"}1' q=\' OFS=/
pause
cp '/Volumes/CX_Jeff_Render_01/OMFI MediaFiles/zJeff_AP/R6v0307,Audio Mixdo54FC00E1.wav' copied

Is your actual file different from your sample?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Turning off the CDE

I am running Solaris 9 and wanted the CDE stopped when my users login. Can this be done by adding something to the .profile? Basically when they login they should be at the command line and have to start the CDE themselves. Thanks (11 Replies)
Discussion started by: meyersp
11 Replies

2. UNIX for Dummies Questions & Answers

Convert Jpeg to useable Unix Pics

I'm running a Sunblade 1500 with 2 XVR-100 video cards. I have Xinerama runing as well. Desktop is CDE. Can someone help me in converting Jpeg pictures so that I can use them as backdrops? Is there a way to make the picture come on both monitors instead of streaching it across both? Thanks. (1 Reply)
Discussion started by: HSTheDuck
1 Replies

3. UNIX for Dummies Questions & Answers

Turning Echo off

Hi, Is there any way like in dos to turn the echo off in a script? i have some lines popping up that i dont wish to be viewed when i am unziping a file it brings up the message updating: log.txt (deflated 72%) and extracting: log.txt i dont want these be viewed. Andy (4 Replies)
Discussion started by: chapmana
4 Replies

4. UNIX for Dummies Questions & Answers

Copy/Paste text as commands in AIX

Hello, I'm absolutely new to this world... but I've a problem with a terminal connected via PuTTY (or Termlite) to an AIX 5.1 application. The problem: I need to paste from clipboard a text containing both input text strings and special keys as ESC, Arrows and so on, to execute in the AIX... (1 Reply)
Discussion started by: Daniele11
1 Replies

5. Solaris

Turning in.ftpd on and off

For two straight days someone was running in.ftpd in my server (apparently looking to break in) and when I would do "top" almost every line would read "in.ftpd". I had a unix sysadmin friend of mine shut it down and then start it back up in a day and a half and all seems OK for now. Here's what I... (1 Reply)
Discussion started by: thomi39
1 Replies

6. UNIX for Advanced & Expert Users

Commands to copy a tar.gz file from a Remote Unix Server to Local Desktop.

Hi, Just wanted to know, how can I ftp/transfer/copy a (design.tar.gz) archive from a Unix Server (sdmc222.sdmc.cp-srv.com) which is at a remote location, to my Windows Desktop. Obviously, it is not possible at cmd prompt on my Windows using the following commands :- ftp... (3 Replies)
Discussion started by: marconi
3 Replies

7. Shell Programming and Scripting

Shell Script to Create non-duplicate lists from two lists

File_A contains Strings: a b c d File_B contains Strings: a c z Need to have script written in either sh or ksh. Derive resultant files (File_New_A and File_New_B) from lists File_A and File_B where string elements in File_New_A and File_New_B are listed below. Resultant... (7 Replies)
Discussion started by: mlv_99
7 Replies

8. Shell Programming and Scripting

Combine two lists From Multiple Grep commands.

I'm working with a file with an xml structure. I'd like to parse it down to just the bits i want. Here is and example of the file <message id="96352877" method="status"> <date rfc="Sat, 12 Mar 2011 16:13:15 -0600" unix="1299967995" /> <services> <service id="facebook"... (4 Replies)
Discussion started by: Erulisseuiin
4 Replies

9. SCO

Need help turning off bootpd

OSR 5.0.7 patched with MP 5 The syslog is flooded with messages: May 9 13:42:12 asiwc bootpd: IP address not found: 192.168.230.215 May 9 13:42:13 asiwc bootpd: IP address not found: 192.168.230.142 May 9 13:42:50 asiwc bootpd: IP address not found: 192.168.230.202 The system... (4 Replies)
Discussion started by: migurus
4 Replies

10. UNIX for Advanced & Expert Users

Lv not useable after lvextend - high I/O

Hello, on an Ubuntu 12.04 NAS there are some lvm's VG #PV #LV #SN Attr VSize VFree vg01 1 2 0 wz--n- 930,45g 411,83g LV VG Attr LSize Origin Snap% Move Log Copy% Convert lv-iscsi vg01 -wi-a- 500,00g lv-root vg01... (0 Replies)
Discussion started by: darktux
0 Replies
LVSCAN(8)						      System Manager's Manual							 LVSCAN(8)

NAME
lvscan - scan (all disks) for Logical Volumes SYNOPSIS
lvscan [-a|--all] [-b|--blockdevice] [-d|--debug] [-h|--help] [--ignorelockingfailure] [-P|--partial] [-v|--verbose] DESCRIPTION
lvscan scans all known volume groups or all supported LVM block devices in the system for defined Logical Volumes. The output consists of one line for each Logical Volume indicating whether or not it is active, a snapshot or origin, the size of the device and its allocation policy. Use lvs(8) or lvdisplay(8) to obtain more-comprehensive information about the Logical Volumes. OPTIONS
See lvm for common options. --all Include information in the output about internal Logical Volumes that are components of normally-accessible Logical Volumes, such as mirrors, but which are not independently accessible (e.g. not mountable). For example, after creating a mirror using 'lvcreate -m1 --mirrorlog disk', this option will reveal three internal Logical Volumes, with suffixes mimage_0, mimage_1, and mlog. -b, --blockdevice This option is now ignored. Instead, use lvs(8) or lvdisplay(8) to obtain the device number. SEE ALSO
lvm(8), lvcreate(8), lvdisplay(8) lvs(8) Sistina Software UK LVM TOOLS 2.02.95(2) (2012-03-06) LVSCAN(8)
All times are GMT -4. The time now is 03:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy