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
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)
Hey there, this is my first post and I'll try to explain my situation as best I can.Here is a sample of the input file:
ADO Sample.h,v ADO Sample 2010-05-21 lyonsb /repository/patents/TSCommon/OpenSource/Dundass/ug6mfc/DataSources/Ado/ADO Sample
ADO SampleDoc.h,v ADO SampleDoc 2010-05-21... (3 Replies)
I have a problem mounting images because of the spaces in the filenames. Does anyone know how to rename files by removing the spaces with the find command?
find Desktop/$dir -name "*.dmg" -print -exec ??? (4 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)
Hello
I've got a certain no. of files in a directory whose names I'm reading and redirecting into a temporary text file using the command below:
ls -l | grep ^- | awk '{print $9}'However, whenever the file names contain spaces the above command considers only the part of the file name up to... (5 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 SUNOS
cssd
cssd(1M) System Administration Commands cssd(1M)NAME
cssd - daemon which invokes and watches the CSs
SYNOPSIS
/usr/sbin/cssd [-f filename]
AVAILABILITY
SUNWjfpu
DESCRIPTION
cssd is the command which invokes and watches CS available in MLE (Multi Language Environment). After five seconds of the ending (includ-
ing abnormal termination) of a CS, cssd re-invokes the CS.
CS STARTING INFORMATION FILE
In a CS starting information file, /etc/css.conf by default, some CS starting information directories are described. This file can be cus-
tomized. cssd reads /etc/css.conf to get CS starting information directories, and then it invokes all executable files in the directories.
Usually, each CS itself is not placed in the directories and is invoked indirectly from a script in one of the directories.
CS STARTING SCRIPT
A CS starting script is located in a CS starting information directory. cssd reads all CS starting information directories in the sequence
specified in /etc/css.conf and finds to invoke all CS starting scripts. If two or more scripts which have the same filename are found,
cssd invokes only the first one.
UPDATING CS STARTING INFORMAION
When cssd receives signal SIGHUP , it re-reads /etc/css.conf and re-finds all CS starting scripts, and then restarts, starts or terminates
each script according to the following conditions.
A script whose modified time is changed (is to be restarted) A script which is newly added (is to be started) A script which is
deleted (is to be terminated)
TO TERMINATE
When cssd receives signal SIGTERM, it sends SIGTERM to each CS under the cssd's management and terminates itself (in general, each CS also
terminates with the signal).
ERROR INFORMATION
As a facility of daemon, cssd sends error information at level `err' , and invoke/re-invoke information at level `notice' to syslogd(1M).
OPTION -f filenaSpecify a CS starting information file. Without this option, /etc/css.conf is used.
FILE
/etc/css.conf file for the information of CSs by default
SEE ALSO css.conf(4), syslogd(1M)BUGS
If a CS starting script is programmed so that itself is exec-ed by a CS, cssd understands that the process of the CS starting script is
terminated in spite of the CS's termination, and so puts syslog message out.
SunOS 5.10 10 Jan 2003 cssd(1M)