The desired outout would be similar to the input file but with specific character lengths.
Here is the first line:
When I run the awk line, it outputs it like this
This is just an example I didn't use the actual character length, however the ouput I'm looking for would be this:
I hope this makes sense, basically the awk line will look at this first field, which is $1, and treat the spaces as spaces, therefore $2 ends up being part of the filename and not the actual second field, and the last field $5 gets truncated.
I have a problem with the script below
#!/bin/sh
for vo in `find -maxdepth 1 -type f -regex "^\./*$"`
do
ls -l "$vo"
some other commands
done
It works fine until `find ...` returns files with spaces. I've tryed to change IFS but haven't succeed
Any solutions? (4 Replies)
I'm trying to do something like that:
for $filename in `ls -1`
do
some_command $filename
done
but it doesn't work properly for file names with spaces, for...in splits at spaces. Anyway around? (4 Replies)
I have files on my unix boxes that users have created with spaces.
Example: /tmp/project plan
ls -l "/tmp/project plan" works fine.
$/tmp>ls -l "/tmp/project plan"
-rw-r--r-- 1 root other 0 Jan 31 12:32 /tmp/project plan
I created a file called test and put just the... (2 Replies)
Hi All,
I see similar problems in past threads but so far no answers have worked for me. I am trying to write a script which parses a txt file that contains one filename per line, then finds those files on the local disk and copies them to a specified directory.
What I have:
... (4 Replies)
Hi
I hope someone will be able to resolve this little teaser!
I am running a script
for file in `ls directory`
do
echo "$file"
...other code here....
done
this works fine unless we receive a file with a name which has a space in it
ie
"filena me"
(I know its not good... (8 Replies)
I want to ftp all the sh files in the directory. Also if any of the file name
contains spaces in them, it should be converted to underscores before it is ftped. I wrote the following code below:
FILESSH=$(ls /mysh/*.sh)
--- FILESH being used here for some other task ---
echo "$FILESSH" |... (3 Replies)
I have the following code:
find /usr/local/test5 -type f -mtime +30 -exec ls -l {} \; | awk '{print $5, $6, $7, $8, $9}'
I have this as output:
14 Aug 12 00:00 /usr/local/test5/file1
14 Aug 12 00:00 /usr/local/test5/lastname,
The bolded part is where I run into trouble. The actual... (4 Replies)
Hello all,
I want to list the file contents of the directory and number them. I am using la and awk to do it now,
#ls |awk '{print NR "." $1}'
1. alpha
2. beta
3. gamma
The problem I have is that some files might also have some spaces in the filenames.
#ls
alpha beta gamma ... (7 Replies)
Hi,
I have files like below, In files coming as spaces. Before transfering those files into ftp server. I want to remove the spaces and then can transfer the files into unix server.
e.g: filenames are
1) SHmail _profile001_20120908.txt
2) SHmail_profile001 _20120908.txt
3) sh... (3 Replies)
I'm trying to handle some files with spaces in their name using "" or \ . Like "file 1" or file\ 1.
My current confusion can be expressed by the following shell script:
#!/bin/bash
touch "file 1" "file 2"
echo -n "ls: " ; ls
echo ---
for file in "file 1" "file 2" ; do
echo $file... (9 Replies)
Discussion started by: Ralph
9 Replies
LEARN ABOUT DEBIAN
dbix::class::storage::dbi::ado::ms_jet
DBIx::Class::Storage::DBI::ADO::MS_Jet(3pm) User Contributed Perl Documentation DBIx::Class::Storage::DBI::ADO::MS_Jet(3pm)NAME
DBIx::Class::Storage::DBI::ADO::MS_Jet - Support for MS Access over ADO
DESCRIPTION
This driver is a subclass of DBIx::Class::Storage::DBI::ADO and DBIx::Class::Storage::DBI::ACCESS for connecting to MS Access via DBD::ADO.
See the documentation for DBIx::Class::Storage::DBI::ACCESS for information on the MS Access driver for DBIx::Class.
This driver implements workarounds for "TEXT/IMAGE/MEMO" columns, sets the cursor_class to DBIx::Class::Storage::DBI::ADO::MS_Jet::Cursor
to normalize returned "GUID" values and provides DBIx::Class::InflateColumn::DateTime support for "DATETIME" columns.
EXAMPLE DSNs
# older Access versions:
dbi:ADO:Microsoft.Jet.OLEDB.4.0;Data Source=C:Users
kitoverDocumentsaccess_sample.accdb
# newer Access versions:
dbi:ADO:Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:Users
kitoverDocumentsaccess_sample.accdb;Persist Security Info=False'
TEXT /IMAGE/MEMO COLUMNS
The ADO driver does not suffer from the problems the ODBC driver has with these types of columns. You can use them safely.
When you execute a "CREATE TABLE" statement over this driver with a "TEXT" column, it will be converted to "MEMO", while in the ODBC driver
it is converted to "VARCHAR(255)".
However, the caveat about LongReadLen having to be twice the max size of your largest "MEMO/TEXT" column +1 still applies. DBD::ADO sets
LongReadLen to a large value by default, so it should be safe to just leave it unset. If you do pass a LongReadLen in your connect_info, it
will be multiplied by two and 1 added, just as for the ODBC driver.
AUTHOR
See "AUTHOR" in DBIx::Class and "CONTRIBUTORS" in DBIx::Class.
LICENSE
You may distribute this code under the same terms as Perl itself.
perl v5.14.2 2011-05-10 DBIx::Class::Storage::DBI::ADO::MS_Jet(3pm)