Sponsored Content
Full Discussion: conversion of loop in perl
Top Forums Shell Programming and Scripting conversion of loop in perl Post 302692965 by learnbash on Tuesday 28th of August 2012 09:06:38 AM
Old 08-28-2012
Below code is also fine, please confirm.

for my $block (glob '/dev/myblock*'){
if ($block=~(^/dev/myblock[a-z]*$)){
...
}
}
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Another bash shell to perl conversion

Hello everyone. I am new to linux and need help again. I need help converting this bash shell to linux: for i in `ls -l *.txt` do `./cnvidtf.pl $i` `curl -u login:pswd --disable-espv -T loadfile.seq ftp://11.1.11.1` `mysql -u login -h 11.1.11.1 -ppswd < lddocs.sql` done Thanks! Any help... (6 Replies)
Discussion started by: freak
6 Replies

2. Shell Programming and Scripting

Perl in KSH - julian conversion

Hello Everyone, I have this code misbehaving in one of my scripts, I have a var containing the sequential number of the day for the year and I am suppose to get the regular date for that day and its weekday. If I set the day to 273 I get back 2008/09/31 which is not a proper date. can you help... (7 Replies)
Discussion started by: gio001
7 Replies

3. Shell Programming and Scripting

[Perl] Timestamp conversion

Hi, I have searched, read and tried, but no luck. I have this code: #!/bin/perl -w #-d use strict; use POSIX qw(strftime); my $getprpw_list="/usr/lbin/getprpw -l"; my $host = "nbsol151"; my $user = "genadmin"; my %uid; my %spwchg; my %upwchg; my %slogint; (2 Replies)
Discussion started by: ejdv
2 Replies

4. Shell Programming and Scripting

Encoding conversion in PERL script

I have oracle 9i database installed with UTF-8 Encoding. I want a perl script that converts unicode to utf8 before commiting in database and utf8 to unicode when retreiving from database For example : the word Ïntêrnatïônàlîzâtion has to be stored in database as Internationalization and when retreived... (6 Replies)
Discussion started by: vkca
6 Replies

5. Shell Programming and Scripting

Perl Conversion Tool

I want a perl script that converts special characters (French, German, Italy, Denmark character set) into database compatible format and retrieves the back in the original format. A generic functionality will be developed which converts any special characters (having > 8 bit format). I tried... (3 Replies)
Discussion started by: perl2ask
3 Replies

6. Shell Programming and Scripting

perl instead of grep 'conversion' help?

Hello: I butchered a shell script together, but my script kung-fu is 5 years old and all I've used for 5 years are for i loops. I hope that some perl guru can do in 5 minutes what takes me 5 weeks, so I am asking for help. I have a simple script using "grep -A 2 'string' /path/to/file" but... (4 Replies)
Discussion started by: Habitual
4 Replies

7. Shell Programming and Scripting

Conversion from Perl to Shell scripting

Hai ! I am doing a research on Bioinformatics and a part of the code in perl have to be converted to shell scripting. I am new to shell programming. Pls. kindly help me to convert this code to shell script though it is somewhat lengthy. PLS KINDLY HELP ME. THANKS IN ADVANCE. my @FreeEnergy =... (1 Reply)
Discussion started by: kswapnadevi
1 Replies

8. Shell Programming and Scripting

Timestamp conversion in PERL

Hi, I have a file as below I need to overwrite the 2 nd column alone to numeric format like "06122011030414012345" as per the timestamp value output file should be the microseconds can be neglected if required. Any help will be appreciated. Thanks in advance (1 Reply)
Discussion started by: irudayaraj
1 Replies

9. Shell Programming and Scripting

conversion of code in perl and python

How to convert below bash code in perl and python. for BLOCK in /sys/block/emcpow* do echo "100000" > "$BLOCK"/queue/nr_requests echo "noop" > "$BLOCK"/queue/scheduler done (2 Replies)
Discussion started by: learnbash
2 Replies

10. Shell Programming and Scripting

Perl - TimeDate format conversion

Dear All, I need to print the below value from excel column 20160219T05:21:59+0100 to 19-FEB-2016 05:21:11 Can anyone help on this datetime format conversion. Please suggest in print logic itself. Regards, Kumaresan P (6 Replies)
Discussion started by: Kumaresanpvk
6 Replies
lofi(7D)							      Devices								  lofi(7D)

NAME
lofi - Loopback file driver DESCRIPTION
The lofi file driver exports a file as a block device. Reads and writes to the block device are translated to reads and writes on the underlying file. This is useful when the file contains a file system image. Exporting it as a block device through the lofi file driver allows normal system utilities to operate on the image through the block device (like fstyp(1M)fsck(1M), and mount(1M). This is useful for accessing CD-ROM and FAT floppy images. See lofiadm(1M) for examples. File block device entries are contained in /dev/lofi, while /dev/rlofi contains the character (or raw) device entries. Entries are in the form of decimal numbers which are assigned through lofiadm(1M). When created, these device entries are owned by root, in group sys, and have permissions 0600. While ownership, group, and permission settings can be altered, there are possible ramifications. See lofiadm(1M) for more information. FILES
/dev/lofictl Master control device /dev/lofi/n Block device for file n /dev/rlofi/n Character device for file n /kernel/drv/lofi 32-bit driver /kernel/drv/lofi.conf Driver configuration file. (Should not be altered.) /kernel/drv/sparcv9/lofi 64-bit driver ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsr, SUNWcarx.u | +-----------------------------+-----------------------------+ SEE ALSO
lofiadm(1M), fsck(1M), fstyp(1M), mount(1M), newfs(1M), attributes(5), lofs(7FS) NOTES
Just as you would not directly access a disk device that has mounted file systems, you should not access a file associated with a block device except through the lofi file driver. For compatability purposes, a raw device is also exported along with the block device. For example, newfs(1M) requires one. SunOS 5.10 30 Jul 1999 lofi(7D)
All times are GMT -4. The time now is 11:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy