rm -f '"vol13/grch76/200013935/Characterizations of Plastics/Optical profiles/3 mil Al foil.tif.20091111170111-2072-1292-0.ark_tagging"'
This is the output from the log file. It looks like there is a single quote and a double quote around the front and back of this line. The rm -r command doesn't alert as to whether it was successful.
---------- Post updated at 02:18 PM ---------- Previous update was at 01:37 PM ----------
I figured it out.
the variables have to be quoted as a whole such as:
I didn't have the double quotes before the back tick of the variable definition.
Thanks for the responses.
hi there
i'm trying to delete blank lines and or lines with spaces only from a series of files in an directory.
to do so, i'm using this:
for files in `ls /users/myname/pesop* 2>/dev/null`
do
grep -v ^$ $files > newfile
mv newfile $files
done
now, this works great for blank lines but... (3 Replies)
I stored results like this
VAR=`wc -l < ls.txt`
But the value of the wc gave me a padded number.
How do I strip the padding from $VAR?
Do you think I could use SED?
Except instead of a file input, have a variable redirection input? (2 Replies)
Dears,
I developed a shell script to read varibales from text file as the following:
cat /dev/null > /rename-OUT.txt
while read line
do
set -- `echo $line`
snmpset -c dslmibs $1 sysName.0 octetstring $2
after=$(snmpget -c dslmibs $1 sysName.0 | cut -d: -f3)
echo "$1,$2,$after" >>... (1 Reply)
I apologize for the long post. I have a lot of info...
I am trying to write a script that will add a network printer (or several) to a system using information read in from a text file. My problem is the spaces in the PPD file name, I'm not sure how to put the file name in or how to read it back... (2 Replies)
Hi all,
I've a requirement as below
Source file src.txt sample data:
A<10 white spaces>B12<5 white spaces>C<17 white spaces>
A1<5 white spaces>B22<5 white spaces>C13<17 white spaces>
when I'm fetching a record from this file into a shell variable like below:
vRec=`head -1 src.txt... (2 Replies)
I'm having a problem with this....
---------------------------------------------------
#!/bin/bash
SPKTAG=" | festival --tts"
echo "Welcome to my shell program" "$SPKTAG";
---------------------------------------------------
I have a variable call SPKTAG " | festival --tts" and I... (2 Replies)
Hello All,
I have a file with data as below. Each line consists of 21 fields. I am not able to load them back to the database.
50733339,"834","834 ","005010X279A1","N","Y","007977163","0001 ",30,"2110D ","EB ","EB007 ","2 ","Conditional Required Data Element Miss
ing... (3 Replies)
Example:
while read line
do
stat -c %G $line
done < somefile.txtThe problem is that inside somefile.txt lines can have any symbol allowed as file name, like (). Even with spaces, it splits the words.
somefile.txt:dira/my first jump.avi
dirb/surf video (1080p).mkv (2 Replies)
Hi All,
I'm trying to run a script which issues rest commands via curl to an endpoint. If I put spaces in fields via something like insomnia, it works, but when I try from an input file, it's failing with a json error.
while IFS=, read mname oname <------ my input file... (10 Replies)
Discussion started by: say170
10 Replies
LEARN ABOUT DEBIAN
hfs
HFS(1) General Commands Manual HFS(1)NAME
hfs - shell for manipulating HFS volumes
SYNOPSIS
hfs [hfs-path [partition-no]]
DESCRIPTION
hfs is an interactive command-oriented tool for manipulating HFS volumes. hfs is based on the Tcl interpreter, so basic Tcl constructs can
be used in addition to the following commands:
mount path [partition-no]
The specified UNIX path is opened as an HFS volume. If a partition number n is specified and the volume source is located on a par-
titioned medium, the nth discovered HFS partition will be mounted. The default partition-no is 1.
umount [path]
The volume previously mounted from the specified path (or the current volume, if none specified) is unmounted.
vol path
The volume previously mounted from the specified path is made current.
info General information about the currently mounted volume is displayed. This information is also displayed automatically when the vol-
ume is mounted.
pwd The full path to the current working HFS directory is displayed.
cd [hfs-path]
The current working directory is changed to the given HFS path. If no path is given, the working directory is changed to the root of
the volume.
dir [hfs-path]
A directory listing of the specified HFS directory is displayed. If no path is given, the contents of the current working directory
are shown.
mkdir hfs-path
A new, empty directory is created with the specified path.
rmdir hfs-path
The specified directory is removed. It must be empty.
create hfs-path [type [creator]]
An empty file is created with the specified path. The Macintosh type and creator may be specified, or they will default to TEXT and
UNIX, respectively.
del hfs-path
Both forks of the specified file are deleted.
stat hfs-path
Status information about the specified HFS path-identified entity is displayed.
cat hfs-path
The data fork of the specified HFS file is displayed.
copyin unix-path [hfs-path [mode]]
The specified UNIX file is copied to the named HFS destination path. Unless specified otherwise, the file will be copied into the
current HFS working directory using a heuristically chosen mode. The mode may be one of: macb (MacBinary II), binh (BinHex), text,
or raw.
copyout hfs-path [unix-path [mode]]
The specified HFS file is copied into the named UNIX destination path. Unless specified otherwise, the file will be copied into the
current UNIX working directory using a heuristically chosen mode. The modes are the same as for copyin.
format path [partition-no [volume-name]]
The specified UNIX path is initialized as an empty HFS volume with the given name, and this volume is subsequently mounted. The
default volume name is Untitled.
The shell is scriptable, however it should be understood that the above commands are actually implemented by Tcl procedures prefixed with
the character "h", e.g. hmount, hcd, etc., in order to avoid name collisions with other Tcl utilities. The "h" may be omitted in interac-
tive use for convenience.
SEE ALSO hfsutils(1), xhfs(1)BUGS
cat can only display the data fork of a file. Text translations are performed unconditionally on the output. Furthermore, binary data can-
not be handled properly from within Tcl scripts since the character with value 0 cannot be represented in Tcl strings. Use copyout to copy
files without these limitations.
AUTHOR
Robert Leslie <rob@mars.org>
HFSUTILS 15-Jan-1997 HFS(1)