Sponsored Content
Top Forums Shell Programming and Scripting need one liner to edit this text... Post 302188714 by ilan on Thursday 24th of April 2008 05:25:11 AM
Old 04-24-2008
Thanks Radoulov, that works perfect.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Awk/Sed One liner for text replacement

Hi group, I want to replace the occurance of a particular text in a paragraph.I tried with Sed,but Sed only displays the result on the screen.How can i update the changes in the original file??? The solution should be a one liner using awk and sed. Thanks in advance. (5 Replies)
Discussion started by: bishnu.bhatta
5 Replies

2. Shell Programming and Scripting

SED text edit help needed

Could someone please tell me how to delete all lines above a line which contains a particular string? (possibly using SED command) I know how to do this if the target string appears in only one line of file but when it appears in multiple lines it only deletes from the first line which the string... (3 Replies)
Discussion started by: stevefox
3 Replies

3. UNIX for Dummies Questions & Answers

edit this text file

hi, i need to remove the first column (and dash) from this text file. Is there any unix command allowing me to do it ? 1-16 2-28 3-16 4-20 5- 8 6-32 7-19 8-16 9-27 10- 7 11-14 12-18 thanks (2 Replies)
Discussion started by: aneuryzma
2 Replies

4. Shell Programming and Scripting

Text editing script does everything but edit text.

I wrote this script to create and edit a large number of websites based on a template site and a collection of text files which have the relevant strings in them delimited by colons. I run it and the shell doesn't produce any errors, but when it gets to the for loop where it actually has to edit... (2 Replies)
Discussion started by: afroCluster
2 Replies

5. Shell Programming and Scripting

Edit Text

Hi everyone , i am new in shell scripting and i want to do a simple job. A have in a file a text that looks like : 4770 maniac 20 0 13680 312 240 S 0.0 0.0 0:00.00 pro 4770 maniac 20 0 23448 312 240 S 0.0 0.0 0:00.00 pro 4770 maniac 20 0 33216 312 240 S 0.0 0.0 0:00.00 pro and i want to... (2 Replies)
Discussion started by: pcmaniac
2 Replies

6. Shell Programming and Scripting

Search & Replace regex Perl one liner to AWK one liner

Thanks for giving your time and effort to answer questions and helping newbies like me understand awk. I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk. Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Discussion started by: verge
9 Replies

7. UNIX for Dummies Questions & Answers

Perl one liner to replace text

Not quite a unix question but problem in a perl command. Taking a chance if someone knows about the error cat 1 a b c d perl -p -e 's/a/b/g' 1 b b c d What is the problem here?? perl -p -i -e 's/a/b/g' 1 Can't remove 1: Text file busy, skipping file. (2 Replies)
Discussion started by: analyst
2 Replies

8. Shell Programming and Scripting

Edit first line of a text file

Hi friends, Issue1: I have a text file with the first line like this #chrom start end Readcount_A Normalized_Readcount_A ReadcountB Normalized_Readcount_B Fc_A_vs_B pvalue_A_vs_B FDR_A_vs_B Fc_B_vs_A pvalue_B_vs_A FDR_B_vs_A <a href="http://unix.com/">Link</a> How can I change it to the... (11 Replies)
Discussion started by: jacobs.smith
11 Replies

9. Shell Programming and Scripting

Script to edit a text file

hi, could someone share a short script that would process a .txt file and do the following, for example the text file has this form 0:1.0 1:1.0 2:2.0 3:3.0 4:4.0 5:5.0 6:6.0 7:7.0 8:8.0 ... {newline} 9:9.0 10:10.0 11:11.0 12:12.0 13:13.0 14:14.0 15:15.0 16:16.0 17:17.0 ... {newline} and I... (3 Replies)
Discussion started by: c_lady
3 Replies

10. Shell Programming and Scripting

Checking and replacing first line in text file, one-liner?

Hello, I'm looking to check only the first line of a file to see if it is a format string, like # -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -\*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2if the first line is anything else, insert the above string. I'd... (3 Replies)
Discussion started by: f77hack
3 Replies
EXFAT.UTIL(8)						    BSD System Manager's Manual 					     EXFAT.UTIL(8)

NAME
exfat.util -- ExFAT file system utility SYNOPSIS
exfat.util -p device removable writable exfat.util -k device exfat.util -s device exfat.util -m device directory removable writable nosuid nodev exfat.util -u device DESCRIPTION
The exfat.util command supports the probing of ExFAT file systems, and getting or setting a volume UUID. Options: -p device removable writable Probe the device to determine whether it contains an ExFAT file system. The removable and writable arguments are ignored for compat- ibility with other file system utilities. If the device appears to contain an ExFAT file system, the exit status is 255. If the file system contains a label (volume name), that name is written to standard output. If the device does not appear to contain an ExFAT file system, the exit status is 254. An exit status of 252 indicates that an I/O error occurred. -k device Return the volume UUID of the ExFAT file system on device. If the device appears to contain an ExFAT file system, the volume's UUID is written to standard output (as formatted by uuid_unparse(3)), and the exit status is 253. If the root directory contains a Volume GUID entry, that GUID is the value returned; otherwise, the 32-bit volume serial number stored in the boot sector is converted to a UUID and returned. If the device does not appear to contain an ExFAT file system, the exit status is 254. An exit status of 252 indicates that an I/O error occurred. device may be mounted or unmounted. If it is mounted, the UUID is obtained through the file system using the getattrlist(2) call. If the device is not mounted, exfat.util reads from the device directly. -s device Set a new UUID for the ExFAT file system on device, which must not be mounted. This generates a new UUID using uuid_generate(3) and stores that UUID in a Volume GUID entry in the root directory (creating one if one does not exist, or updating an existing entry). If the UUID is successfully set, the exit status is 253. If the device does not appear to contain an ExFAT file system, the exit status is 254. An exit status of 252 indicates that device was already mounted, or an I/O error occurred. -m device directory removable writable nosuid nodev Deprecated. Mount the ExFAT file system from device onto directory. The removable argument should be either removable if the device is removable, or fixed otherwise. The actual argument value is currently ignored. The writable argument must be either readonly or writable which mounts the volume read-only or read/write, respectively. The nosuid argument must be either suid or nosuid. That argument is passed as a mount option. The nodev argument must be either dev or nodev. That argument is passed as a mount option. -u device Deprecated. Unmount the file system on device. If the unmount is successful, the exit status is 253. FILES
The exfat.util command is installed in the /System/Library/Filesystems/exfat.fs/Contents/Resources directory, which is typically not in a shell's search path. COMPATIBILITY
The -m and -u options are deprecated. The preferred way to mount an ExFAT volume is to let diskarbitrationd(8) mount it automatically when the device is discovered, or use the diskutil(8) command to explicitly mount a device. You may also use the mount(8) or mount_exfat(8) com- mands directly. The preferred way to unmount an ExFAT volume is with the diskutil(8) command. Note that using the umount(8) command usually will not work because various process are likely to have open files, which will prevent the unmount. The diskutil(8) command will send a notification that causes many such processes to close their open files so that the unmount will succeed. SEE ALSO
mount_exfat(8), fsck_exfat(8), diskarbitrationd(8,) diskutil(8), uuid(3,) uuid_unparse(3), uuid_generate(3), getattrlist(2) HISTORY
The exfat.util utility first appeared in Mac OS X 10.6.3. BUGS
The choice of non-zero exit status to indicate success was an unfortunate design decision. The -u option usually does not work since several processes in Mac OS X leave files open on mounted volumes, thus preventing the unmount. The diskutil(8) command is preferred for unmounting. Darwin January 19, 2010 Darwin
All times are GMT -4. The time now is 10:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy