Sponsored Content
Full Discussion: A quick help on python dict
Top Forums UNIX for Beginners Questions & Answers A quick help on python dict Post 303032136 by panyam on Tuesday 12th of March 2019 01:41:06 PM
Old 03-12-2019
Hi,

Managed to find a solution within python. Can be closed.

Code:
for item in dict.values():
            currentOffset+=int(str(item).partition("offset")[2].partition("metadata")[0].replace('=','').replace(',',''))

thnx
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

i need quick help???...please

hey guys i'm new in this world " unix " i wanna any websites can help me to learn unix or any websites i can download UNIX from it thanks :D (3 Replies)
Discussion started by: M_Hafez
3 Replies

2. Shell Programming and Scripting

Need quick help

I have one script that named testing.sh #cat testing.sh #/bin/bash echo "Enter your name:" read name #./testing.sh Enter your name: Sanjay What I need it should take Input in the same prompt(mean to say dun go for next line) like given below. #./testing.sh Enter your name:Sanjay ... (1 Reply)
Discussion started by: SanjayLinux
1 Replies

3. Shell Programming and Scripting

grep: can't open /usr/dict/words

Hi All, If I use the "/usr/dict/words" inside the shell script, It is showing the error as, grep: can't open /usr/dict/words How can we resolve it? Thanks & Regards, Raja (2 Replies)
Discussion started by: Rajakct84
2 Replies

4. Programming

Python: bash-shell-like less functionality in the python shell

Hello, Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells? Example: >>> import subprocess >>> help(subprocess) ... ... I'm hoping so as I hate scrolling and love how less works with... (0 Replies)
Discussion started by: Narnie
0 Replies

5. SuSE

"ssh suse-server 'python -V' > python-version.out" not redirecting

Okay, so I have had this problem on openSUSE, and Debian systems now and I am hoping for a little help. I think it has something to do with Python but I couldn't find a proper Python area here. I am trying to redirect the output of "ssh suse-server 'python -V'" to a file. It seems that no matter... (3 Replies)
Discussion started by: Druonysus
3 Replies

6. Shell Programming and Scripting

**python** unable to read the background color in python

I am working on requirement on spreadsheet in python scripting. I have a spreadsheet containing cell values and with background color. I am able to read the value value but unable to get the background color of that particular cell. Actually my requirement is to read the cell value along... (1 Reply)
Discussion started by: giridhar276
1 Replies

7. Windows & DOS: Issues & Discussions

How to execute python script on remote with python way..?

Hi all, I am trying to run below python code for connecting remote windows machine from unix to run an python file exist on that remote windows machine.. Below is the code I am trying: #!/usr/bin/env python import wmi c = wmi.WMI("xxxxx", user="xxxx", password="xxxxxxx")... (1 Reply)
Discussion started by: onenessboy
1 Replies

8. Programming

Create a C source and compile inside Python 1.4.0 to 3.7.0 in Python for ALL? platforms...

Hi all... As you know I like making code backwards compatible for as many platforms as possible. This Python script was in fact dedicated for the AMIGA A1200 using Pythons 1.4.0, 1.5.2, 1.6.0, 2.0.1, and 2.4.6 as that is all we have for varying levels of upgrades from a HDD and 4MB FastRam... (1 Reply)
Discussion started by: wisecracker
1 Replies
MMLS(1) 						      General Commands Manual							   MMLS(1)

NAME
mmls - Display the partition layout of a volume system (partition tables) SYNOPSIS
mmls [-t mmtype ] [-o offset ] [ -i imgtype ] [-b dev_sector_size] [-BrvV] [-aAmM] image [images] DESCRIPTION
mmls displays the layout of the partitions in a volume system, which include partition tables and disk labels. ARGUMENTS
-t mmtype Specify the media management type. Use '-t list' to list the supported types. If not given, autodetection methods are used. -o offset Specify the offset into the image where the volume containing the partition system starts. The relative offset of the partition system will be added to this value. -b dev_sector_size The size, in bytes, of the underlying device sectors. If not given, the value in the image format is used (if it exists) or 512-bytes is assumed. -i imgtype Identify the type of image file, such as raw or split. If not given, autodetection methods are used. -B Include a column with the partition sizes in bytes -r Recurse into DOS partitions and look for other partition tables. This setup frequently occurs when Unix is installed on x86 sys- tems. -v Verbose output of debugging statements to stderr -V Display version -a Show allocated volumes -A Show unallocated volumes -m Show metadata volumes -M Hide metadata volumes image [images] One (or more if split) disk images whose format is given with '-i'. 'mmls' is similar to 'fdisk -lu' in Linux with a few differences. Namely, it will show which sectors are not being used so that those can be searched for hidden data. It also gives the length value so that it can be plugged into 'dd' more easily for extracting the partitions. It also will show BSD disk labels for Free, Open, and NetBSD and will display the output in sectors and not cylinders. Lastly, it works on non-Linux systems. If none of -a, -A, -m, or -M are given then all volume types will be listed. If any of them are given, then only the types specified on the command line will be listed. Allocated volumes are those that are listed in a partition table in the volume system AND can store data. Unallocated volumes are virtu- ally created by mmls to show you which sectors have not been allocated to a volume. The metadata volumes overlap the allocated and unallo- cated volumes and describe where the partition tables and other metadata structures are located. In some volume systems, these structures are in allocated space and in others they are in unallocated space. In some volume systems, their location is explicitly given in the par- tition tables and in others they are not. EXAMPLES
To list the partition table of a Windows system using autodetect: # mmls disk_image.dd To list the contents of a BSD system that starts in sector 12345 of a split image: # mmls -t bsd -o 12345 -i split disk-1.dd disk-2.dd AUTHOR
Brian Carrier <carrier at sleuthkit dot org> MMLS(1)
All times are GMT -4. The time now is 04:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy