Sponsored Content
Operating Systems OS X (Apple) rm -f a text file separated by \n Post 302427271 by Corona688 on Friday 4th of June 2010 11:37:03 AM
Old 06-04-2010
You almost had it on your second try.

Code:
function large_rm ()
{
	while read line; do
		rm -rfv $line
	done
}
large_rm /Erase/duplicates

Code:
function large_rm ()
{
	while read line; do
		rm -rfv "$line"
	done
}
large_rm < /Erase/duplicates

Also remove the quotes from your file.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sum up a decimal column in a tab separated text file and error handling

Hi, I have a small requirement where i need to sum up a column in a text file. Input file 66ab 000000 534385 -00000106350.00 66cd 000000 534485 -00013364511.00 66ad 000000 534485 -00000426548.00 672a 000000 534485 000000650339.82... (5 Replies)
Discussion started by: pssandeep
5 Replies

2. Shell Programming and Scripting

How to format file into comma separated text file?

Hi Guys, I have text file which is tab/space separated but I want it to re-format into a comma separated and trim the spaces in between. Can someone spare me a perl or sed script that can do the job? INPUT FILE: 500010245623 500 21-APR-11 05.58.21 PM ... (14 Replies)
Discussion started by: pinpe
14 Replies

3. Shell Programming and Scripting

Parsing and filtering multiline text into comma separated line

I have a log file that contains several reports with following format. <Start of delimiter> Report1 header Report1 header continue Report1 header continue Record1 header Record1 header continue Record1 header continue field1 field2 field3 field4 ------... (1 Reply)
Discussion started by: yoda9691
1 Replies

4. Shell Programming and Scripting

Text file to CSV with field data separated by blank lines

Hello, I have some data in a text file where fields are separated by blank lines. There are only 6 fields however some fields have several lines of data as I will explain. Also data in a particular field is not consistently the same size but does end on a blank line. The first field start with... (6 Replies)
Discussion started by: vestport
6 Replies

5. UNIX for Dummies Questions & Answers

[solved] Comma separated values to space separated

Hi, I have a large number of files which are written as csv (comma-separated values). Does anyone know of simple sed/awk command do achieve this? Thanks! ---------- Post updated at 10:59 AM ---------- Previous update was at 10:54 AM ---------- Guess I asked this too soon. Found the... (0 Replies)
Discussion started by: lost.identity
0 Replies

6. Shell Programming and Scripting

Split text separated by ; in a column into multiple columns

Hi, I need help to split a long text in a column which is separated by ; and i need to print them out in multiple columns. My input file is tab-delimited and has 11 columns as below:- aRg02004 21452 asdfwf 21452 21452 4.6e-29 5e-29 -1 3 50 ffg|GGD|9009 14101.10 High class -node. ; ffg|GGD|969... (3 Replies)
Discussion started by: redse171
3 Replies

7. Shell Programming and Scripting

Read record from the text file contain multiple separated values & assign those values to variables

I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables. I need to read this file which is an input to my script Config.txt file name, first path, second... (7 Replies)
Discussion started by: ketanraut
7 Replies

8. Shell Programming and Scripting

How to cut a pipe delimited file and paste it with another file to form a comma separated outputfile

Hello ppl I have a requirement to split (cut in unix) a file (A.txt) which is a pipe delimited file into A1.txt and A2.txt Now I have to join (paste in unix) this A2.txt with external file A3.txt to form output file A4.txt which should be CSV (comma separated file) so that third party can... (25 Replies)
Discussion started by: etldev
25 Replies

9. Shell Programming and Scripting

Convert tab separated text to non-trivial xml. (pwsafe --> KeePassx)

I'd like to take the output of `pwsafe --exportdb > database.txt` and convert it to a KeePassX XML friendly format (feature request in pwsafe). I found flat file converter but the syntax is beyond me with this example. Solutions are welcomed. More details Here is the pwsafe --> KeePassX XML... (2 Replies)
Discussion started by: graysky
2 Replies

10. Shell Programming and Scripting

Match text to lines in a file, iterate backwards until text or text substring matches, print to file

hi all, trying this using shell/bash with sed/awk/grep I have two files, one containing one column, the other containing multiple columns (comma delimited). file1.txt abc12345 def12345 ghi54321 ... file2.txt abc1,text1,texta abc,text2,textb def123,text3,textc gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
Gnome2::VFS::Drive(3pm) 				User Contributed Perl Documentation				   Gnome2::VFS::Drive(3pm)

NAME
Gnome2::VFS::Drive - Container around Gnome2::VFS::Volume HIERARCHY
Glib::Object +----Gnome2::VFS::Drive METHODS
string = $drive->get_activation_uri integer = $a->compare ($b) o $b (Gnome2::VFS::Drive) string = $drive->get_device_path devicetype = $drive->get_device_type string = $drive->get_display_name $drive->eject ($func, $data=undef) o $func (scalar) o $data (scalar) string = $drive->get_hal_udi Since: vfs 2.8 string = $drive->get_icon unsigned = $drive->get_id boolean = $drive->is_connected boolean = $drive->is_mounted boolean = $drive->is_user_visible $drive->mount ($func, $data=undef) o $func (scalar) o $data (scalar) list = $drive->get_mounted_volumes Since: vfs 2.8 boolean = $drive->needs_eject Since: vfs 2.16 $drive->unmount ($func, $data=undef) o $func (scalar) o $data (scalar) SIGNALS
volume-mounted (Gnome2::VFS::Drive, Gnome2::VFS::Volume) volume-pre-unmount (Gnome2::VFS::Drive, Gnome2::VFS::Volume) volume-unmounted (Gnome2::VFS::Drive, Gnome2::VFS::Volume) ENUMS AND FLAGS
enum Gnome2::VFS::DeviceType o 'unknown' / 'GNOME_VFS_DEVICE_TYPE_UNKNOWN' o 'audio-cd' / 'GNOME_VFS_DEVICE_TYPE_AUDIO_CD' o 'video-dvd' / 'GNOME_VFS_DEVICE_TYPE_VIDEO_DVD' o 'harddrive' / 'GNOME_VFS_DEVICE_TYPE_HARDDRIVE' o 'cdrom' / 'GNOME_VFS_DEVICE_TYPE_CDROM' o 'floppy' / 'GNOME_VFS_DEVICE_TYPE_FLOPPY' o 'zip' / 'GNOME_VFS_DEVICE_TYPE_ZIP' o 'jaz' / 'GNOME_VFS_DEVICE_TYPE_JAZ' o 'nfs' / 'GNOME_VFS_DEVICE_TYPE_NFS' o 'autofs' / 'GNOME_VFS_DEVICE_TYPE_AUTOFS' o 'camera' / 'GNOME_VFS_DEVICE_TYPE_CAMERA' o 'memory-stick' / 'GNOME_VFS_DEVICE_TYPE_MEMORY_STICK' o 'smb' / 'GNOME_VFS_DEVICE_TYPE_SMB' o 'apple' / 'GNOME_VFS_DEVICE_TYPE_APPLE' o 'music-player' / 'GNOME_VFS_DEVICE_TYPE_MUSIC_PLAYER' o 'windows' / 'GNOME_VFS_DEVICE_TYPE_WINDOWS' o 'loopback' / 'GNOME_VFS_DEVICE_TYPE_LOOPBACK' o 'network' / 'GNOME_VFS_DEVICE_TYPE_NETWORK' SEE ALSO
Gnome2::VFS, Glib::Object COPYRIGHT
Copyright (C) 2003-2007 by the gtk2-perl team. This software is licensed under the LGPL. See Gnome2::VFS for a full notice. perl v5.14.2 2011-11-15 Gnome2::VFS::Drive(3pm)
All times are GMT -4. The time now is 11:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy