Search Results

Search: Posts Made By: Fred Goldman
1,785
Posted By Fred Goldman
I think I might have this figured out: ...
I think I might have this figured out:

#!/usr/bin/sh
echo -n > C:/Test/File
for file in P*
do
echo "[CTO][GSR]/ / /|ql|[CTE]
[DOWN]" >> C:/Test/File
done
cd usr/tmp
for file in *
do
...
1,785
Posted By Fred Goldman
Is there any way to edit this script so that it...
Is there any way to edit this script so that it is compatible with sh?
1,785
Posted By Fred Goldman
That's correct, I wrote this as a bash script,...
That's correct, I wrote this as a bash script, but when I tried running it today at work it wouldn't run, so I changed it to sh.

I thought that the syntax was very similar. I thought that bash...
1,785
Posted By Fred Goldman
Syntax error, puzzling
I am just learning over here unix scripting and the OS in general.

I wrote this script (with some great help from you guys here) when I test at my desktop with cygwin it works fine, but when I...
5,089
Posted By Fred Goldman
Perfect, thank you! I must have looked over...
Perfect, thank you!

I must have looked over all the options on find at least three times and for some reason I never caught the -maxdepth option.
5,089
Posted By Fred Goldman
Right, but it's recursive, I want it to only find...
Right, but it's recursive, I want it to only find files in the present directory, not sub-directories. And I can't specifically name the directories that I want to omit, because they will be...
5,089
Posted By Fred Goldman
Aha, perfect, thank you very much! I am just...
Aha, perfect, thank you very much!

I am just having one final problem. I don't want the find to look through all sub-directories. I did a search and someone came up with this idea, but I can't...
5,089
Posted By Fred Goldman
Right, but I need it to write it to the file...
Right, but I need it to write it to the file without overwriting what is already there. Here is my code:

#!/bin/bash
fileArray=($(find . -name 'P*' -type f))
tLen=${#fileArray[@]}
for (( i=0;...
5,089
Posted By Fred Goldman
Read/write file with scripting
Is there any way to write to a text file with scripting? I need to write to a text file two lines of text for the amount of files in the current directory.
1,864
Posted By Fred Goldman
Very nice! Thank you!
Very nice!

Thank you!
1,864
Posted By Fred Goldman
Copying curent directory
I am trying to write a script that first copies all the directories and files from the current directory into a new Directory. I get and error "Cannot copy directory into itself". That's fine. I...
6,691
Posted By Fred Goldman
Come to think of it, all I need the script to do...
Come to think of it, all I need the script to do is copy all the files that were modified after Jan 1, 2008 to a new folder.
6,691
Posted By Fred Goldman
Help modifying script to loop through all folders
I have this script someone very kindly help me write last year which loops through all files in a folder and does a command.

I need to modify it to loop through all sub-folders of a main folder...
7,016
Posted By Fred Goldman
Hi Porter and drl, Thank you, thank you,...
Hi Porter and drl,

Thank you, thank you, thank you!

The sh script worked!

You guys are right, forget about tcsh. I was under the impression that if my shell is tcsh I can't run an sh script....
7,016
Posted By Fred Goldman
So should I just run it the way it is or should I...
So should I just run it the way it is or should I change the first line to:

#!/bin/tcsh
7,016
Posted By Fred Goldman
But that won't work in tcsh, right?
But that won't work in tcsh, right?
7,016
Posted By Fred Goldman
tcsh I can't get script to work :(
I have an export utility that exports documents from the native file to text. This is the way I would run it from the command line:

expage "file" > "file.txt

I am trying to loop through all the...
13,557
Posted By Fred Goldman
OK, Ive done a little research and this should be...
OK, Ive done a little research and this should be the syntax for tcsh:

#!/usr/bin/env tcsh

foreach file ($*)
set newname="$file.txt"
export "$file" /> "$newname"
end

The only thing I...
13,557
Posted By Fred Goldman
OK, I think we are getting somewhere. With...
OK, I think we are getting somewhere.

With ksh I got syntax error line 7 done unexpected
With sh I got syntax error line 4 ( unexpected.
13,557
Posted By Fred Goldman
OK, this is the exact script I am running, I just...
OK, this is the exact script I am running, I just get a "command not found". Any ideas?

#!/bin/tcsh
ls | while read FILE; do
NEWFILE=${LINE##* }
echo $(date +%H:%M) expage "$FILE" \>...
13,557
Posted By Fred Goldman
OK, I am going to try this tomorrow... The P...
OK, I am going to try this tomorrow...

The P before the file name is the way ProType recognizes its files like a file extension of some sort (I apologize I know very little about UNIX). I need the...
13,557
Posted By Fred Goldman
Looping through files...
I posted this in the Solaris forum, but I don't think it's platform specific, so I'm posting it here.

Here is the situation. We are a company that has been using a professional publishing system,...
Forum: Solaris 11-06-2007
2,683
Posted By Fred Goldman
I'm sorry this took so long. Ok, yes, it is...
I'm sorry this took so long.

Ok, yes, it is in fact a command line utility. If I were to be doing it now I would do this:

1) Type: cd /bedford6:/export

2) Then I would type the directory of...
Forum: Solaris 11-01-2007
2,683
Posted By Fred Goldman
Thank you, that's very nice of you to write the...
Thank you, that's very nice of you to write the code for us.

It looks like I should be putting the folder name where the * and myProTypeConverter is the variable that holds the command to run the...
Forum: Solaris 11-01-2007
2,683
Posted By Fred Goldman
Batch converting documents
Here is the situation. We are a company that has been using a professional publishing system, the software is called "ProType". It runs on Solaris 2.4, however it is no longer supported and we are...
Showing results 1 to 25 of 25

 
All times are GMT -4. The time now is 02:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy