02-16-2005
Hi kinmak,
If you want to grant full permissions mode to the files (777),your shell script should be as the following:
#! /bin/ksh
cat input.txt | while read line
do
chmod 777 $line >/dev/null 2>&1
done
Good luck!
Nir
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to read lines in a loop.
eg.
In a file with 100 lines..first I want to read first 1 to 10 lines and redirect it
to other file, then next 10 lines ( 11 to 20 ) and redirect it to the file ...
.till end of file.
I am not sure how to achieve this.Need help. (2 Replies)
Discussion started by: amitraorane
2 Replies
2. Windows & DOS: Issues & Discussions
I have been doing unix scripting for quite awhile and there seems to be a wealth of information on it.
Now I am working on migrating an intel based application to a new server.
I need to modify some existing scripts, but am having trouble finding information on windows scripting, a forum similar... (2 Replies)
Discussion started by: MizzGail
2 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
We are running a batch job using Unix script. This batch job is running daily to get data from a Mainframe database and to load our tables. We are using an interactive ID for the batch job. If we removed that interactive ID, the batch job fails. What's my question is.. Is the... (1 Reply)
Discussion started by: pradeep.edara
1 Replies
4. Shell Programming and Scripting
Hi,
I have a shell script to find files older than 'X' days ($2) in directory path ($1) and delete them.
Like this:
my_file_remover.sh /usr/home/c 90
Now, I need to modify this script and add it in CRON, so that it checks other directories also.
Like:
my_file_remover.sh /usr/home/c... (3 Replies)
Discussion started by: guruparan18
3 Replies
5. UNIX for Dummies Questions & Answers
echo "enter employee #:/c"
read employee
grep -w $employee /tmp/file.txt
when it asked me employee #, i typed employee, worked fine.
when it asked me employee #, i type ENTER, it just sit there.
if someone type in NULL or ENTER key, i want to exit out. (2 Replies)
Discussion started by: tjmannonline
2 Replies
6. UNIX for Dummies Questions & Answers
Hi
In unix how to create a batch job and Is there any command to close file in unix. Please help me I am new to unix world (6 Replies)
Discussion started by: vinay.h4
6 Replies
7. Shell Programming and Scripting
Hi Experts,
I have a requirement where i need to setup a batch job which runs everymonth and move the pdf files from unix server to windows servers.
Could some body provide the inputs for this.
and also please provide the inputs on how to map the network dirve in the unix like that... (1 Reply)
Discussion started by: ger199901
1 Replies
8. Solaris
Is it possible for a process id of 1. Is there anything special about 1 or 8 ? (7 Replies)
Discussion started by: Harleyrci
7 Replies
9. Windows & DOS: Issues & Discussions
Hi,
I am using a batch file to run 2 or more shutdown batch for each of my server like below:
Shutdown_serverA.bat
Shutdown_serverB.bat
...
Is there anyway i can do this in parallel instead of serially:confused:
ServerA & ServerB shutdown at the same time in one click (batch). (4 Replies)
Discussion started by: beginningDBA
4 Replies
10. Shell Programming and Scripting
Dear Friends,
I am looking for a shell script to merge input files into one file .. here is my idea:
1st paramter would be outfile file (all input files content)
read all input files and merge them to input param 1
ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies
LEARN ABOUT REDHAT
unix2dos
unix2dos(1) General Commands Manual unix2dos(1)
NAME
unix2dos - UNIX to DOS text file format converter
SYNOPSYS
unix2dos [options] [-c convmode] [-o file ...] [-n infile outfile ...]
Options:
[-hkqV] [--help] [--keepdate] [--quiet] [--version]
DESCRIPTION
This manual page documents unix2dos, the program that converts text files in UNIX format to DOS format.
OPTIONS
The following options are available:
-h --help
Print online help.
-k --keepdate
Keep the date stamp of output file same as input file.
-q --quiet
Quiet mode. Suppress all warning and messages.
-V --version
Prints version information.
-c --convmode convmode
Sets conversion mode. Simulates unix2dos under SunOS.
-o --oldfile file ...
Old file mode. Convert the file and write output to it. The program default to run in this mode. Wildcard names may be used.
-n --newfile infile outfile ...
New file mode. Convert the infile and write output to outfile. File names must be given in pairs and wildcard names should NOT be
used or you WILL lost your files.
EXAMPLES
Get input from stdin and write output to stdout.
unix2dos
Convert and replace a.txt. Convert and replace b.txt.
unix2dos a.txt b.txt
unix2dos -o a.txt b.txt
Convert and replace a.txt in ASCII conversion mode. Convert and replace b.txt in ISO conversion mode.
unix2dos a.txt -c iso b.txt
unix2dos -c ascii a.txt -c iso b.txt
Convert and replace a.txt while keeping original date stamp.
unix2dos -k a.txt
unix2dos -k -o a.txt
Convert a.txt and write to e.txt.
unix2dos -n a.txt e.txt
Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt.
unix2dos -k -n a.txt e.txt
Convert and replace a.txt. Convert b.txt and write to e.txt.
unix2dos a.txt -n b.txt e.txt
unix2dos -o a.txt -n b.txt e.txt
Convert c.txt and write to e.txt. Convert and replace a.txt. Convert and replace b.txt. Convert d.txt and write to f.txt.
unix2dos -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
DIAGNOSTICS
BUGS
The program does not work properly under MSDOS in stdio processing mode. If you know why is that so, please tell me.
AUTHOR
Benjamin Lin - ( blin@socs.uts.edu.au )
MISCELLANY
Tested environment:
Linux 1.2.0 with GNU C 2.5.8
SunOS 4.1.3 with GNU C 2.6.3
MS-DOS 6.20 with Borland C++ 4.02
Suggestions and bug reports are welcome.
SEE ALSO
dos2unix(1)
1995.03.31 unix2dos v2.2 unix2dos(1)