07-29-2012
All files in the directory
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to be able to list all the names in a file which begin with a capital letter, but I don't want it to list words that begin a new sentence. Is there any way round this?
Thanks for your help. (1 Reply)
Discussion started by: kev269
1 Replies
2. Shell Programming and Scripting
Gurus -
I got one simple TXT file with long file name with blank spaces in between the words. I am trying to display that full file name, but it breaks while displaying. Could somebody shed some light here?
Script
------
for i in `cat ~\temp\employee.txt`
do
echo $i
done (5 Replies)
Discussion started by: Eric_2005
5 Replies
3. Shell Programming and Scripting
Hi,
What's the best way to find all files under a directory - including ones with space - in order to apply a command to each of them. For instance I want get a list of files under a directory and generate a checksum for each file.
Here's the csh script:
#!/bin/csh
set files = `find $1... (5 Replies)
Discussion started by: same1290
5 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I found the mimesender multiple attachment emailing shell script in the FAQ of these forums, and I have been able to use it to send multiple files, but only if they don't have spaces in their file name or path.
When I attempt to send a file with spaces in it's name, enclosed... (0 Replies)
Discussion started by: rsmorra
0 Replies
5. Shell Programming and Scripting
Hi All,
I have spaces in between file names.
"Material Header.txt"
"Customer Header.txt"
"Vendor Header.txt"
And how can I remove spaces between file names like below
MaterialHeader.txt
CustomerHeader.txt
VendorHeader.txt
Thanks
Srimitta (10 Replies)
Discussion started by: srimitta
10 Replies
6. Shell Programming and Scripting
I developed a perl code..And the excerpt from it is given below...
open(HANDLE,$cmp_path) ; #reading the xml file from the file path
while($file_path = <HANDLE>)
I have list of XML files to read from a folder. It has some spaces inside the name of the file...I used "\"... (2 Replies)
Discussion started by: gameboy87
2 Replies
7. Shell Programming and Scripting
please somebody tell me what is wrong with this, while the thumbnail grabbing works and encoding works, but what is not working is, mv $i.jpg /var/www/thumbs/ and mv $i.mp4 /var/www/uploads/
#!/bin/bash
# MINT 9 - FFMPEG - QT-FASTSTART - X264 - MP4
DIR=/var/www/tmp
for i in... (9 Replies)
Discussion started by: mysoogal
9 Replies
8. Shell Programming and Scripting
Is it possible to remove empty lines between >humid-sets (bold) and also humidset that start with -- (for ex: > humid3 | () : | (+) )
Thanx in advance
Note: The humid sets will be in thousands and lines will be more than 100 thousand.
input
> humid1 | () : | (+)... (7 Replies)
Discussion started by: quincyjones
7 Replies
9. OS X (Apple)
Hi All,
I have a vexing issue with leading spaces in file names. Basically, we're moving tons of data from our ancient afp file share to Box.com and Box forbids leading spaces in files or folders. The HFS file system seems to be perfectly fine with this, but almost all other Unix file systems... (1 Reply)
Discussion started by: prometheon123
1 Replies
10. Shell Programming and Scripting
I am running a UNIX script to get unused files and their sizes from the server. The issue is arising due to the spaces present in the filename/folder names.Due to this the du -k command doesn't work properly.But I need to calculate the size of all files including the ones which have spaces in them.... (4 Replies)
Discussion started by: INNSAV1
4 Replies
LEARN ABOUT SUSE
pdl::char
Char(3) User Contributed Perl Documentation Char(3)
NAME
PDL::Char -- PDL subclass which allows reading and writing of fixed-length character strings as byte PDLs
SYNOPSIS
use PDL;
use PDL::Char;
my $pchar = PDL::Char->new( [['abc', 'def', 'ghi'],['jkl', 'mno', 'pqr']] );
$pchar->setstr(1,0,'foo');
print $pchar; # 'string' bound to "", perl stringify function
# Prints:
# [
# ['abc' 'foo' 'ghi']
# ['jkl' 'mno' 'pqr']
# ]
print $pchar->atstr(2,0);
# Prints:
# ghi
DESCRIPTION
This subclass of PDL allows one to manipulate PDLs of 'byte' type as if they were made of fixed length strings, not just numbers.
This type of behavior is useful when you want to work with charactar grids. The indexing is done on a string level and not a character
level for the 'setstr' and 'atstr' commands.
This module is in particular useful for writing NetCDF files that include character data using the PDL::NetCDF module.
FUNCTIONS
new
Function to create a byte PDL from a string, list of strings, list of list of strings, etc.
# create a new PDL::Char from a perl array of strings
$strpdl = PDL::Char->new( ['abc', 'def', 'ghij'] );
# Convert a PDL of type 'byte' to a PDL::Char
$strpdl1 = PDL::Char->new (sequence (byte, 4, 5)+99);
$pdlchar3d = PDL::Char->new([['abc','def','ghi'],['jkl', 'mno', 'pqr']]);
string
Function to print a character PDL (created by 'char') in a pretty format.
$char = PDL::Char->new( [['abc', 'def', 'ghi'], ['jkl', 'mno', 'pqr']] );
print $char; # 'string' bound to "", perl stringify function
# Prints:
# [
# ['abc' 'def' 'ghi']
# ['jkl' 'mno' 'pqr']
# ]
# 'string' is overloaded to the "" operator, so:
# print $char;
# should have the same effect.
setstr
Function to set one string value in a character PDL. The input position is the position of the string, not a character in the string. The
first dimension is assumed to be the length of the string.
The input string will be null-padded if the string is shorter than the first dimension of the PDL. It will be truncated if it is longer.
$char = PDL::Char->new( [['abc', 'def', 'ghi'], ['jkl', 'mno', 'pqr']] );
$char->setstr(0,1, 'foobar');
print $char; # 'string' bound to "", perl stringify function
# Prints:
# [
# ['abc' 'def' 'ghi']
# ['foo' 'mno' 'pqr']
# ]
$char->setstr(2,1, 'f');
print $char; # 'string' bound to "", perl stringify function
# Prints:
# [
# ['abc' 'def' 'ghi']
# ['foo' 'mno' 'f'] -> note that this 'f' is stored "f "
# ]
atstr
Function to fetch one string value from a PDL::Char type PDL, given a position within the PDL. The input position of the string, not a
character in the string. The length of the input string is the implied first dimension.
$char = PDL::Char->new( [['abc', 'def', 'ghi'], ['jkl', 'mno', 'pqr']] );
print $char->atstr(0,1);
# Prints:
# jkl
perl v5.12.1 2009-10-17 Char(3)