07-22-2009
It should. I tested it and it worked:
# ls -l /opt/ | tr [a-z] [A-Z]
TOTAL 12
DRWXR-XR-X 9 ROOT ROOT 4096 JUL 17 12:45 VIRTUALBOX
DRWXR-XR-X 9 ROOT ROOT 4096 JUN 11 07:05 SPLUNK
DRWXR-XR-X 6 ROOT ROOT 4096 JUN 6 11:36 SUN-JRE-BIN-1.6.0.13
Make sure there is something (files) in your current directory.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How to combine 3 find statements into 1-liner?
find statements:
cd ${dir1} ; find . ! -name . -prune -type f | xargs file | grep -i ascii | cut -f1 -d: | xargs grep -l "${searchtxt}"
cd ${dir2} ; find . ! -name . -prune -type f | xargs file | grep -i ascii | cut -f1 -d: | xargs grep -l... (4 Replies)
Discussion started by: ux4me
4 Replies
2. Solaris
Hi SSHers,
I have embedded this below code in my shell script..
/usr/bin/ssh -t $USER@$SERVER1 /usr/bin/ssh $USER2@S$SERVER2 echo uptime:`/opt/OV/bin/snmpget -r 0 -t 60 $nodeName system.3.0 | cut -d: -f3-5`
SSH to both these servers are public-key authenticated, so things run... (13 Replies)
Discussion started by: LinuxUser2008
13 Replies
3. Shell Programming and Scripting
Hi
I am trying to search and replace a multi line pattern in a php file using awk.
The pattern starts with
<div id="navbar">
and ends with
</div>
and spans over an unknown number of lines.
I need the command to be a one liner.
I use the "record separator" like this :
awk -v... (8 Replies)
Discussion started by: louisJ
8 Replies
4. Shell Programming and Scripting
I would like to print result of multiple search pattern invoked from an one liner. The code looks like this but won't work
gawk -F '{{if ($0 ~ /pattern1/) pat1=$1 && if ($0 ~ /pattern2/) pat2=$2} ; print pat1, pat2}'
Can anybody help getting the right code? (10 Replies)
Discussion started by: sdf
10 Replies
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
Hi,
I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them.
Each of... (20 Replies)
Discussion started by: amarn
20 Replies
7. UNIX for Dummies Questions & Answers
hi,
I have a directory "test" under which there are 3 files a.txt,b.txt and c.txt.
I need to rename those files to a.pl,b.pl and c.pl respectively.
is it possible to achieve this in a sed or awk one liner?
i have searched but many of them are scripts.
I need to do this in a one liner.
I... (2 Replies)
Discussion started by: pandeesh
2 Replies
8. Shell Programming and Scripting
I am new for Perl I want to ask one question. I have around 50 custom packages which i am using in my Perl script. I want to import all .pm packages in my Perl script in an easy way. Right now i have to import each package individually. So Is there any way to do so??
Right Now i am doing like:
... (1 Reply)
Discussion started by: Navrattan Bansa
1 Replies
9. UNIX for Dummies Questions & Answers
Hi all,
What is the maximum number of sed squeezing in one shell?? I've surprised with this message when I squeezed 50 sed in the same shell:
253: Identifier too long - maximum length is 18.This is what I've did in my sed query
| sed -e "s/ 0 /Default /" | sed -e "s/ 1 ... (2 Replies)
Discussion started by: leo_ultra_leo
2 Replies
10. UNIX for Advanced & Expert Users
Hello,
I'm attempting to open multiple xterms and run a command as an SAP user via sudo using PSSH. So far, I'm able to run PSSH to a file of servers with no check for keys, open every xterm in to the servers in the file list, and SUDO to the SAP(ADM) user, but it won't do anything else... (11 Replies)
Discussion started by: icemanj
11 Replies
LEARN ABOUT DEBIAN
srec_emon52
srec_emon52(5) File Formats Manual srec_emon52(5)
NAME
srec_emon52 - Elektor Monitor (EMON52) file format
DESCRIPTION
This format is used by the monitor EMON52, developed by the European electronics magazine Elektor (Elektuur in Holland). Elektor wouldn't
be Elektor if they didn't try to reinvent the wheel. It's a mystery why they didn't use an existing format for the project. Only the
Elektor Assembler will produce this file format, reducing the choice of development tools dramatically.
Records
All data lines are called records, and each record contains the following four fields:
+---+------+---+-----------+------+
|cc | aaaa | : | dd ... dd | ssss |
The field are defined as follows: +---+------+---+-----------+------+
cc The byte count. A two digit hex value (1 byte), counting the actual data bytes in the record. The byte count is separated from
the next field by a space.
aaaa The address field. A four hex digit (2 byte) number representing the first address to be used by this record.
: The address field and the data field are separated by a colon.
dd The actual data of this record. There can be 1 to 255 data bytes per record (see cc) All bytes in the record are separated from
each other (and the checksum) by a space.
ssss Data Checksum, adding all bytes of the data line together, forming a 16 bit checksum. Covers only all the data bytes of this
record.
Please note that there is no End Of File record defined.
Byte Count
The byte count cc counts the actual data bytes in the current record. Usually records have 16 data bytes. I don't know what the maximum
number of data bytes is. It depends on the size of the data buffer in the EMON52.
Address Field
This is the address where the first data byte of the record should be stored. After storing that data byte, the address is incremented by
1 to point to the address for the next data byte of the record. And so on, until all data bytes are stored.
The address is represented by a 4 digit hex number (2 bytes), with the MSD first.
Data Field
The payload of the record is formed by the Data field. The number of data bytes expected is given by the Byte Count field.
Checksum
The checksum is a 16 bit result from adding all data bytes of the record together.
Size Multiplier
In general, binary data will expand in sized by approximately 3.8 times when represented with this format.
EXAMPLE
Here is an example of an EMON52 file:
10 0000:57 6F 77 21 20 44 69 64 20 79 6F 75 20 72 65 61 0564
10 0010:6C 6C 79 20 67 6F 20 74 68 72 6F 75 67 68 20 61 05E9
10 0020:6C 6C 20 74 68 69 73 20 74 72 6F 75 62 6C 65 20 05ED
10 0030:74 6F 20 72 65 61 64 20 74 68 69 73 20 73 74 72 05F0
04 0040:69 6E 67 21 015F
SEE ALSO
http://sbprojects.fol.nl/knowledge/fileformats/emon52.htm
AUTHOR
This man page was taken from the above Web page. It was written by San Bergmans <sanmail@bigfoot.com>
Reference Manual SRecord srec_emon52(5)