Sponsored Content
Top Forums UNIX for Advanced & Expert Users Removing portion of file name Post 302662331 by radoulov on Tuesday 26th of June 2012 11:59:59 AM
Old 06-26-2012
Code:
for f in *.dat; do
  mv -- "$f" "${f#${f%_*_*}_}"
done

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove portion of file

Can anyone tell me how to remove a portion of a large file to smaller ones? What I have is a large file that was created becasue several similar files were joined together. Each individual file starts with MSG_HEAD. I want to take everything from MSG_HEAD up to were it says MSG_HEAD again and... (13 Replies)
Discussion started by: methos
13 Replies

2. Programming

Delete Portion of a file

hi i would like to know whether i can delete a part of a file in C for eg. if my file contained 1234567890 and i want to delete 456 so that it becomes 1237890 is there a way i can do this. well, one way i can achieve this is by creating a new file, copy whatever i want, then delete the... (2 Replies)
Discussion started by: sameersbn
2 Replies

3. Shell Programming and Scripting

select a portion of a file into a CSV

How will i convert a file <LDATE>10-12-07</LDATE><LTIME>13:47:48.553</LTIME><LTEXT>name:anju;city:blore;ph:123</LTEXT> <LDATE>10-12-07</LDATE><LTIME>13:47:48.553</LTIME><LTEXT>name:anju;city:blore;ph:123</LTEXT>... (8 Replies)
Discussion started by: anju
8 Replies

4. Shell Programming and Scripting

removing a portion of a code from a file

Hi everyone, I need to know how to remove a chunk of codes from a file for instance i have couple of lines which are commented out of the file and i need to remove that block. here is the example --#------------------------------------------------------------------ --# File name= ... (5 Replies)
Discussion started by: ROOZ
5 Replies

5. UNIX for Dummies Questions & Answers

Print a portion of file

Hi, I have a little problem. I am having a file with pattern like : asdf;ffgg;dfjfj;djdfjf;nnjj;djd;ssj; I just want to print the portion from last ";" upto the immediate previous ";". There are several ";" in my line. Please help me out... Thnx in advance (8 Replies)
Discussion started by: vanand420
8 Replies

6. Shell Programming and Scripting

Grep certain portion from the file

Dear Friends, Here I am with another difficulty. I have a flat file from which I wanna grep following pattern. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Statement Date : Blah blah Blah blah Blah blah Blah blah... (1 Reply)
Discussion started by: anushree.a
1 Replies

7. UNIX for Dummies Questions & Answers

Portion of a file in a new files

Hi, I need to devide one file into 3 files based on column numbers and put a string (FILE1, FILE2, FILE3) in the last..... Input file: Column1,Column2,Column3,Column4,Column5,Column6,Column7,Column8,Column9,Column10 Output1: Column1,Column3,Column6,Column4,Column5,FILE1 Output2:... (6 Replies)
Discussion started by: yale_work
6 Replies

8. Shell Programming and Scripting

Removing a portion of data in a file

Hi, I have a folder that contains many (multiple) files 1.fasta 2.fasta 3.fasta 4.fasta 5.fasta . . 100's of files Each such file have data in the following format for example: vi 1.fasta Code: >AB_1 MLKKPIIIGVTGGSGGGKTSVSRAILDSFPNARIAMIQHDSYYKDQSHMSFEERVKTNYDHPLAFDTDFM (6 Replies)
Discussion started by: Lucky Ali
6 Replies

9. Shell Programming and Scripting

Unix Scripting : Sort a Portion of a File and not the complete file

Need to sort a portion of a file in a Alphabetical Order. Example : The user adam is not sorted and the user should get sorted. I don't want the complete file to get sorted. Currently All_users.txt contains the following lines. ############## # ARS USERS ############## mike, Mike... (6 Replies)
Discussion started by: evrurs
6 Replies

10. UNIX for Dummies Questions & Answers

How to append portion of a file content to another file when a certain pattern is matching?

Hi ladies and gentleman.. I have two text file with me. I need to replace one of the file content to another file if one both files have a matching pattern. Example: text1.txt: ABCD 1234567,HELLO_WORLDA,HELLO_WORLDB DCBA 3456789,HELLO_WORLDE,HELLO_WORLDF text2.txt: XXXX,ABCD... (25 Replies)
Discussion started by: bananamen
25 Replies
ACPIDUMP(1)						      General Commands Manual						       ACPIDUMP(1)

NAME
acpidump - dump a system's ACPI tables to an ASCII file acpixtract - convert ASCII acpidump output to raw binary table turbostat - gather performance statistics SYNOPSIS
acpidump [options] acpixtract [options] [filename] turbostat [options] [command [arg]...] DESCRIPTION
This manual page documents briefly the acpidump , acpixtract and turbostat commands. turbostat reads hardware registers and gather statistics on the processor clock frequency and C-state usage. Works properly on Nehalem and newer processors and on Linux kernel 2.6.30 and later versions. OPTIONS
acpidump options are as follow: -a, --addr 0x1234 look for tables at this phisical address -t, --table DSDT only dump table with DSDT signature -o, --output filename redirect output from stdout to filename -b, --binary dump data in binary form rather than in hex-dump format -l, --lenght 0x456 works only with --addr, dump phisical memory region without trying to understand it's contents -s, --skip 2 skip 2 tables of the given name and output only 3rd one -h, --help outputs an help message OPTIONS
acpixtract options are as follow: -a extract all tables, not just DSDT/SSDT -l list table summaries, do not extract -s<Signature> Extract all tables named <Signature> OPTIONS
turbostat options are as follow: -v makes turbostat more verbose -i <sec> polling interval, default is 5 When given a command turbostat runs it and outputs statistics gathered while the program was running. EXAMPLES
Dump the DSDT table to the file DSDT.aml in binary format (this can be disassembled later with iasl(1)): acpidump -b -t DSDT -o DSDT.aml Show the FACP table: acpidump -t FACP > FACP.dat acpixtract -a FACP.dat iasl -d FACP.dat Dump and extract all ACPI tables: acpidump -o DSDT.dat acpixtract -a Parse APIC tables: acpidump -o DSDT.dat acpixtract -sAPIC DSDT.dat SEE ALSO
iasl(1), AUTHOR
acpidump was written by Alexey Starikovskiy and Len Brown. This manual page was written by Mattia Dongili <malattia@debian.org>, for the Debian project (but may be used by others). October 19, 2005 ACPIDUMP(1)
All times are GMT -4. The time now is 07:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy