09-02-2015
On top of answering jim mcnamara's question, you should consider supplying more details, e.g. is it one file, multiple or all files in the source directory, and how to discriminate between them, and based on which criteria the sequence numbers should be distributed.
This User Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have file called xx
Now i want to rename this file as xxYYYYMMDD_HHMIAM.xls
Here is my code..
export DATE1=`date +%Y%m%d`
mv xx xx$DATE1
This code renames as xxYYYYMMDD
Now how can i append HHMIAM at the end of the file?
Any help is appreciated... (3 Replies)
Discussion started by: govindts
3 Replies
2. Shell Programming and Scripting
Hello, I wanted to append 'XYZ' at the end of the text file. How can i do this?
I searched the forums and i am not getting what i want. Any help is highly appreciated. Thanks (2 Replies)
Discussion started by: govindts
2 Replies
3. Shell Programming and Scripting
can anyone tell me please ......how to append a new field at the end of a file with the help of sed or some other command in bourne shell (8 Replies)
Discussion started by: amitpta
8 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I need to create a script which checks for a particular file for eg.kumar1.txt.
If kumar1.txt is already exist the script should increment the file name as kumar2.txt and so on.
Please Advise.
Thanks & Regards,
Kumar66 (2 Replies)
Discussion started by: kumar66
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have to append 2 files and while appending i need to add a running sequence number (counter ) for each line at the first column.
For e.g. If file x contains details as below.
Tom
Dick
Harry
Charlie
and file y contains
Boston
Newyork
LA
Toledo
Then the new file should... (1 Reply)
Discussion started by: kalyansid
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
My requirement is to append a date in format DDMMYYYYHHMISS at the end of first line of file which is HEADER. I am trying command
sed -i '1s/.*/&<date_format>/' <file_name>
Where <date_format>=`date +%m%d%Y%H%M%S`
I am somehow misisng the right quotes ti get this added in above... (2 Replies)
Discussion started by: sanjaydubey2006
2 Replies
7. Shell Programming and Scripting
Hi all,
I have a file like this
ID 3BP5L_HUMAN Reviewed; 393 AA.
AC Q7L8J4; Q96FI5; Q9BQH8; Q9C0E3;
DT 05-FEB-2008, integrated into UniProtKB/Swiss-Prot.
DT 05-JUL-2004, sequence version 1.
DT 05-SEP-2012, entry version 71.
FT COILED 59 140 ... (1 Reply)
Discussion started by: manigrover
1 Replies
8. UNIX for Advanced & Expert Users
Here is my dir structure:
/tmp/dave/myappend.txt
/tmp/dave/dir1/test.txt
/tmp/dave/dir2/test.txt
/tmp/dave/dir3/test.txt
/tmp/dave/dir4/test.txt
I want to append the contents of myappend.txt to the end of each file with the name "test.txt" in all dirs in /tmp/dave/
I have tried this:... (2 Replies)
Discussion started by: bigd213
2 Replies
9. Shell Programming and Scripting
Hi Gurus,
Need help. I'm a beginner in Unix. I have a requirement, need to add or append newline (\n) character in file.
Sample Data:
1|Main|Test|~#
2|Main|Hello|~#
3|Main|Unix|~#
4|Main|File|~#Output:
1|Main|Test|~#
2|Main|Hello|~#
3|Main|Unix|~#
4|Main|File|~#\n -- append only... (13 Replies)
Discussion started by: Gouri Solleti
13 Replies
10. Shell Programming and Scripting
Hi,
I am in a terrible emergency. I have multiple cdr files with line count >6000.
I need to append |0| | | | | | | |random| to end of each line. The random number should never repeat.
Please help with a shell script to process all cdr's in a directory with above requirement. (23 Replies)
Discussion started by: shiburnair
23 Replies
IOREG(8) BSD System Manager's Manual IOREG(8)
NAME
ioreg -- show I/O Kit registry
SYNOPSIS
ioreg [-abfilrtx] [-c class] [-d depth] [-k key] [-n name] [-p plane] [-w width]
DESCRIPTION
ioreg displays the I/O Kit registry. It shows the heirarchical registry structure as an inverted tree. The provider-client relationships
among those objects is shown as follows:
+-o provider
|
+-o client
By default, object properties are not shown. The use of the -c, -k, -l, or -n options cause ioreg to show properties for objects that match
the specified criteria.
By supplying the -r option, the user may specify the object which will appear at the root of the tree with the -c, -k, or -n options. If
root matches more than one object, multiple trees will be displayed.
The options are as follows:
-a Archive the output in XML.
-b Show the object name in bold.
-c Show the object properties only if the object is an instance of, or derives from, the specified C++ class (e.g. IOService).
-d Limit tree traversal to the specified depth. The depth limit is applied with respect to each subtree root individually. Therefore,
supplying a depth of 1 will cause ioreg to display only (sub)tree root nodes; children will not be shown.
-f Enable smart formatting. ioreg knows how to format certain properties so that the output is more readable and meaningful, decoding
data fields where appropriate. Currently supported are `reg', `assigned-addresses', `slot-names', `ranges', `interrupt-map', `inter-
rupt-parent`, and `interrupts'.
-i Show the object inheritance.
-k Show the object properties only if the object has the specified key. Substrings do not match; the specified key must be a full prop-
erty name.
-l Show properties for all displayed objects.
-n Show the object properties only if the object has the specified name. The object location, if any, is considered part of the name,
thus pci@f0000000 and pci@f4000000 are distinct names.
-p Traverse the registry over the specified plane. The default plane value is ``IOService''. The other planes, such as ``IODeviceTree'',
can be found under the ``IORegistryPlanes'' property of the root object (ioreg -d 1 -k IORegistryPlanes).
-r Show subtrees rooted by objects that match the specified criteria. If none of -c, -k, or -n are supplied, -r has no effect.
-t Show tree location of each subtree. This option causes ioreg to display all nodes between the I/O Kit Root and the root of the dis-
played subtree, i.e. the subtree's parent, grandparent, etc.
-w Clip the output to the specified line width. The default width value is the current screen size. A value of 0 specifies an unlimited
line width.
-x Show data and numbers as hexadecimal.
Darwin September 26, 2011 Darwin