Sponsored Content
Full Discussion: Can't figure this one out --
Top Forums UNIX for Dummies Questions & Answers Can't figure this one out -- Post 302488584 by Chubler_XL on Monday 17th of January 2011 08:23:31 PM
Old 01-17-2011
The reason for this is touch was called with three arguments:

Code:
touch ~/vendorlists/First Vendor File.txt

If you want to create a file with spaces in it's name quote the variable:

Code:
* ) touch ~/vendorlists/"$vendorfilename.txt"  #places file into the vendorlists folder

This results in a call to touch like this, which is what you need:
Code:
touch ~/vendorlists/"First Vendor File.txt"

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

i can not figure this out

I am having problems scripting in UNIX. I am currently attending school and for the first time I am being introduced to scripting. My problem is I am supposed to enhance the spell_check by adding a third optional argument. The third argument is to specify a list of words to be added to the... (1 Reply)
Discussion started by: steph
1 Replies

2. UNIX for Dummies Questions & Answers

figure it out

hi there i am new to this site and this linux and unix stuff so kind of plz help me out hoe to start the stuff.... (1 Reply)
Discussion started by: cool_dude
1 Replies

3. Shell Programming and Scripting

Can't figure out else not matching

All, I appreciate any help you can provide on this. I get an "else unmatched" error with this code and can't figure out why. If I remove the 1st if statement through the 1st else the script runs through fine. Any thoughts? #decrypt file sudo -u gpg /usr/bin/gpg... (4 Replies)
Discussion started by: peteroc
4 Replies

4. Shell Programming and Scripting

Cant figure out this..

Hi, I need a little help here. I am exporting user info from a PSQL database and everything is working with the exception of this: 10029008:dsAuthMethodStandard\:dsAuthClearText:classword:10029008:2004:10029008:10029008:/home/student/1002/90/08:10029008 It is putting a colon right before the... (1 Reply)
Discussion started by: Stud33
1 Replies

5. IP Networking

How do I figure out the subnet?

Hi, How do I get subnet from this: 10.252.0.138/25 Tnx (2 Replies)
Discussion started by: mehrdad68
2 Replies

6. Shell Programming and Scripting

Please help me to figure out the logic for this problem

Hello, i am on 2.6.13-1.1526_FC4smp i have directory named /home , and in there i have directory 2009_10_10 and two files : 2009_10_10.log and 2009_10_11.log How to write shell script which will delete only file/s that don't have his/their 'parent' directory, so in this case , only... (7 Replies)
Discussion started by: tonijel
7 Replies

7. UNIX for Dummies Questions & Answers

How to figure out what each IP address is used for?

Hi, I have inherited a server at work that has one IP and two virtual IP's. It is live and I want to figure out what each IP is being used for. I thought of NETSTAT but I cannot figure out how to get it to list what each IP is listening for. ANy advice? (8 Replies)
Discussion started by: mojoman
8 Replies

8. UNIX for Advanced & Expert Users

Can't figure out how this is working

I have two machines, each with a virtual interface, with the following configurations: Machine1: eth2 Link encap:Ethernet HWaddr 00:09:6B:19:E5:05 inet addr:172.16.0.201 Bcast:172.16.0.255 Mask:255.255.255.0 eth2:0 Link encap:Ethernet HWaddr 00:09:6B:19:E5:05 ... (0 Replies)
Discussion started by: druidmatrix
0 Replies

9. UNIX for Dummies Questions & Answers

Can't figure out why this repeats

#!/bin/sh while IFS=: read address port; do : ${port:=443} address=$address port=$port cd $f_location number=`grep "$address" thing.txt -A 1 | grep "addresses=" | cut -d'"' -f2` echo "$address,$port,$number,$answer" >>... (9 Replies)
Discussion started by: shade917
9 Replies

10. Shell Programming and Scripting

Help with change significant figure to normal figure command

Hi, Below is my input file: Long list of significant figure 1.757E-4 7.51E-3 5.634E-5 . . . Desired output file: 0.0001757 0.00751 0.00005634 . . . (10 Replies)
Discussion started by: perl_beginner
10 Replies
Touch(3pm)						User Contributed Perl Documentation						Touch(3pm)

NAME
File::Touch - update access and modification timestamps, creating nonexistent files where necessary. SYNOPSIS
use File::Touch; @file_list = ('one.txt','../two.doc'); $count = touch(@file_list); use File::Touch; $reference_file = '/etc/passwd'; $touch_obj = File::Touch->new( reference => $reference_file, no_create => 1 ); @file_list = ('one.txt','../two.doc'); $count = $touch_obj->touch(@file_list); DESCRIPTION
Here's a list of arguments that can be used with the object-oriented contruction: atime_only => [0|1] If nonzero, change only the access time of files. Default is zero. mtime_only => [0|1] If nonzero, change only the modification time of files. Default is zero. no_create => [0|1] If nonzero, do not create new files. Default is zero. reference => $reference_file If defined, use timestamps from this file instead of current time. Default is undefined. atime => $time If defined, use this time (in epoch seconds) instead of current time for access time. mtime => $time If defined, use this time (in epoch seconds) instead of current time for modification time. Examples Update access and modification times, creating nonexistent files use File::Touch; my @files = ('one','two','three'); my $count = touch(@files); print "$count files updated "; Set access time forward, leave modification time unchanged use File::Touch; my @files = ('one','two','three'); my $day = 24*60*60; my $time = time() + 30 * $day; my $ref = File::Touch->new( atime_only => 1, time => $time ); my $count = $ref->touch(@files); print "$count files updated "; Set modification time back, update access time, do not create nonexistent files use File::Touch; my @files = ('one','two','three'); my $day = 24*60*60; my $time = time() - 30 * $day; my $ref = File::Touch->new( mtime => $time, no_create => 1 ); my $count = $ref->touch(@files); print "$count files updated "; AUTHOR
Nigel Wetters Gourlay (nwetters@cpan.org) COPYRIGHT
Copyright (c) 2001,2007,2009 Nigel Wetters Gourlay. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself. perl v5.10.0 2009-07-25 Touch(3pm)
All times are GMT -4. The time now is 12:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy