Sponsored Content
Top Forums UNIX for Advanced & Expert Users how can I read the space in the end of line Post 302138198 by radoulov on Sunday 30th of September 2007 08:08:00 AM
Old 09-30-2007
Just change IFS:

Code:
while IFS= read ...


Last edited by radoulov; 09-30-2007 at 09:38 AM.. Reason: content changed
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

to see space, tab, end of the line chracters

what can I use ?? In vi, I can use :set list <-- and see end of line $.. or use cat -A but I am wondering if there is command or program that allows me to see all the hidden characters( space, tab and etc) Please help thanks. (3 Replies)
Discussion started by: convenientstore
3 Replies

2. Shell Programming and Scripting

Add white space to the end of a line with sed

Im trying to add 5 blank spaces to the end of each line in a file in a sed script. I can figure out who o put the spaces pretty much anywhere else but at the end. thanks Karl (7 Replies)
Discussion started by: karlanderson
7 Replies

3. Shell Programming and Scripting

sed : replace space and end-of-line

Hi ! I'm rather new with sed ... learned a lot already by googling etc ... The following script should replace all spaces and ends-of-lines with "something (see below). #!/bin/bash i=0 while read line do fam="H`printf "%06d" $i`" echo $line | sed -e 's//\t'$fam'\n/g' i=$(($i+1))... (7 Replies)
Discussion started by: jossojjos
7 Replies

4. Shell Programming and Scripting

Replace end of line with a space

for eg: i have i/p file as: ================ i wnt to change end of line ================= my require ouput is like: i wnt to change end of line ==================== (7 Replies)
Discussion started by: RahulJoshi
7 Replies

5. Shell Programming and Scripting

NULL in between, at begining or at end of line - convert to space

How to replace null with space? I want to make each line with 80 characters. If any line contains only 5 characters and remaining is null, then i want to make it as 80 characrets where 5 is original characters and remaining 75 characters will be null.. NULL can come in between the line,... (3 Replies)
Discussion started by: Amit.Sagpariya
3 Replies

6. Shell Programming and Scripting

Remove line starting from space till end.

Hi, I have a code tag, from which i have the below snippet: intelrpt.GetCMB_FB type=ODBC> intelrpt.GetCMB_FB type=SYBASE> I want the output like: intelrpt.GetCMB_FB intelrpt.GetCMB_FB That is remove the lines starting from WHITESPACE till end. Please help. I am new to... (7 Replies)
Discussion started by: anupdas
7 Replies

7. Shell Programming and Scripting

How to Add space at the end of each line in linux

hi,. I am writing a small script in csh... Can any one tel me how to add space at end of each line in a file (9 Replies)
Discussion started by: Manju87
9 Replies

8. Shell Programming and Scripting

my shell now adds extra space at end of each line!

Hi, Since today, with csh or tcsh, if I do 'ls files* > list', every lines end with an extra space! What happenned? What can I do to go back when there was no extra space? If I change to bash, there's no extra space. Thanks, Patrick ---------- Post updated at 03:19 PM... (1 Reply)
Discussion started by: trogne
1 Replies

9. Shell Programming and Scripting

With script bash, read file line per line starting at the end

Hello, I'm works on Ubuntu server My goal : I would like to read file line per line, but i want to started at the end of file. Currently, I use instructions : while read line; do COMMAND done < /var/log/apache2/access.log But, the first line, i don't want this. The file is long... (5 Replies)
Discussion started by: Fuziion
5 Replies

10. Shell Programming and Scripting

Gawk --- produce the output in pattern space instead of END space

hi, I'm trying to calculate IP addresses and their respective calls to our apache Server. The standard format of the input is HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST... (2 Replies)
Discussion started by: busyboy
2 Replies
Device::Cdio::ISO9660::IFS(3pm) 			User Contributed Perl Documentation			   Device::Cdio::ISO9660::IFS(3pm)

NAME
Device::Cdio::ISO9660::IFS - Class for ISO 9660 Filesystem image reading SYNOPSIS
This encapsulates ISO 9660 Filesystem Image handling. The class is often used in conjunction with Device::Cdio::ISO9660. use Device::Cdio::ISO9660; use Device::Cdio::ISO9660::IFS; $iso = Device::Cdio::ISO9660::IFS->new(-source=>'copying.iso'); $id = $iso->get_application_id(); @file_stats = $iso->readdir($path); foreach my $href (@file_stats) { printf "%s [LSN %6d] %8d %s%s ", $href->{is_dir} ? "d" : "-", $href->{LSN}, $href->{size}, $path, Device::Cdio::ISO9660::name_translate($href->{filename}); } DESCRIPTION
This is an Object-Oriented interface to the GNU CD Input and Control library ("libcdio") which is written in C. This class handles ISO 9660 aspects of an ISO 9600 image. An ISO-9660 image is distinct from a CD in a CD-ROM which has ISO-9660 tracks; the latter contains other CD-like information (e.g. tracks, information or assocated with the CD). An ISO-9660 filesystem image on the other hand doesn't and is generally file in some file system, sometimes with the file extension ".iso"; perhaps it can be burned into a CD with a suitable tool, perhaps is can be "mounted" as a filesystem on some OS's. CALLING ROUTINES Routines accept named parameters as well as positional parameters. For named parameters, each argument name is preceded by a dash. For example: Device::Cdio::ISO9660::IFS->new(-source=>'MYISO.ISO') Each argument name is preceded by a dash. Neither case nor order matters in the argument list. -driver_id, -Driver_ID, and -DRIVER_ID are all acceptable. In fact, only the first argument needs to begin with a dash. If a dash is present in the first argument, we assume dashes for the subsequent parameters. In the documentation below and elsewhere in this package the parameter name that can be used in this style of call is given in the parameter list. For example, for "open" the documentation below reads: open(source, iso_mask=$pyiso9660::EXTENSION_NONE)->bool So the parameters are "source", and "is_mask". The iso_mask parameter is not required and if not specified a value of $perliso9660:EXTENSION_NON will be used. The older, more traditional style of positional parameters is also supported. So the "have_driver example from above can also be written: Cdio::open($s, $i) Finally, since no parameter name can be confused with an integer, negative values will not get confused as a named parameter. METHODS
new new(source, iso_mask)->$iso9660_object Create a new ISO 9660 object. Source or iso_mask is optional. If source is given, open() is called using that and the optional iso_mask parameter; iso_mask is used only if source is specified. If source is given but opening fails, undef is returned. If source is not given, an object is always returned. close close()->bool Close previously opened ISO 9660 image and free resources associated with ISO9660. Call this when done using using an ISO 9660 image. find_lsn find_lsn(lsn)->$stat_href Find the filesystem entry that contains LSN and return file stat information about it. "undef" is returned on error. get_application_id get_application_id()->$id Get the application ID stored in the Primary Volume Descriptor. undef is returned if there is some problem. get_preparer_id get_preparer_id()->$id Get the preparer ID stored in the Primary Volume Descriptor. undef is returned if there is some problem. get_publisher_id get_publisher_id()->$id Get the publisher ID stored in the Primary Volume Descriptor. undef is returned if there is some problem. get_root_lsn get_root_lsn()->$lsn Get the Root LSN stored in the Primary Volume Descriptor. undef is returned if there is some problem. get_system_id get_system_id()->$id Get the Volume ID stored in the Primary Volume Descriptor. undef is returned if there is some problem. get_volume_id get_volume_id()->$id Get the Volume ID stored in the Primary Volume Descriptor. undef is returned if there is some problem. get_volumeset_id get_volume_id()->$id Get the Volume ID stored in the Primary Volume Descriptor. undef is returned if there is some problem. open open(source, iso_mask=$perliso9660::EXTENSION_NONE)->bool Open an ISO 9660 image for reading. Subsequent operations will read from this ISO 9660 image. This should be called before using any other routine except possibly new. It is implicitly called when a new is done specifying a source. If device object was previously opened it is closed first. See also open_fuzzy. open_fuzzy open_fuzzy(source, iso_mask=$perliso9660::EXTENSION_NONE, fuzz=20)->bool Open an ISO 9660 image for reading. Subsequent operations will read from this ISO 9660 image. Some tolerence allowed for positioning the ISO9660 image. We scan for $perliso9660::STANDARD_ID and use that to set the eventual offset to adjust by (as long as that is <= $fuzz). This should be called before using any other routine except possibly new (which must be called first. It is implicitly called when a new is done specifying a source. See also open. read_fuzzy_superblock read_fuzzy_superblock(iso_mask=$perliso9660::EXTENSION_NONE, fuzz=20)->bool Read the Super block of an ISO 9660 image but determine framesize and datastart and a possible additional offset. Generally here we are not reading an ISO 9660 image but a CD-Image which contains an ISO 9660 filesystem. readdir readdir(dirname)->@iso_stat Read path (a directory) and return a list of iso9660 stat references Each item of @iso_stat is a hash reference which contains LSN the Logical sector number (an integer) size the total size of the file in bytes sec_size the number of sectors allocated filename the file name of the statbuf entry XA if the file has XA attributes; 0 if not is_dir 1 if a directory; 0 if a not; FIXME: If you look at iso9660.h you'll see more fields, such as for Rock-Ridge specific fields or XA specific fields. Eventually these will be added. Volunteers? read_pvd read_pvd()->pvd Read the Super block of an ISO 9660 image. This is the Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume Descriptor if (Joliet) extensions are acceptable. read_superblock read_superblock(iso_mask=$perliso9660::EXTENSION_NONE)->bool Read the Super block of an ISO 9660 image. This is the Primary Volume Descriptor (PVD) and perhaps a Supplemental Volume Descriptor if (Joliet) extensions are acceptable. seek_read seek_read(start, size=1)->(size, str) Seek to a position and then read n bytes. Size read is returned. stat stat(path, translate=0)->\%stat Return file status for path name psz_path. "undef" is returned on error. If translate is 1, version numbers in the ISO 9660 name are dropped, i.e. ;1 is removed and if level 1 ISO-9660 names are lowercased. Each item of @iso_stat is a hash reference which contains LSN the Logical sector number (an integer) size the total size of the file in bytes sec_size the number of sectors allocated filename the file name of the statbuf entry XA if the file has XA attributes; 0 if not is_dir 1 if a directory; 0 if a not. SEE ALSO
See also Device::Cdio for module information, Device::Cdio::ISO9660::FS and Device::Cdio::Device for device objects and Device::Cdio::Track for track objects. perliso9660 is the lower-level interface to "libiso9660", the ISO 9660 library of <http://www.gnu.org/software/libcdio>. <http://www.gnu.org/software/libcdio/doxygen/iso9660_8h.html> is documentation via doxygen of "libiso9660". doxygen. AUTHORS
Rocky Bernstein "<rocky at cpan.org>". COPYRIGHT
Copyright (C) 2006, 2007, 2008 Rocky Bernstein <rocky@cpan.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. perl v5.14.2 2012-06-22 Device::Cdio::ISO9660::IFS(3pm)
All times are GMT -4. The time now is 01:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy