To fix this code you could use:
But this is highly inefficient and will not give you complete filenames if any of your filenames contain whitespace characters. The suggestions in your other thread today: Browse directory would be much better ways to do this.
Also, note that *prueba.txt will not match any of the files listed in the other thread. (There is a HUGE difference between *prueba.txt and prueba*.txt!)
This User Gave Thanks to Don Cragun For This Post:
Maybe it's an stupid question but remeber... I'm Junior..
I use command line to run programs, and some of them gives a lot of information when, for example, you open a window or other actions. That's really bad because my terminal gets full of unwanted messages, so I use "bin file & >/dev/null"... (1 Reply)
Hi,
Q1-What does
nroff -ms > /dev/null
Q2- What does mean -A under STAT column :
ps aux |head -20
UTIL PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
root 516 93,0 0,0 12 12 - A 04 nov 3906:51 wait
Thank you. (4 Replies)
hello all,
In many shell scripts i found '> /dev/null' , i am not able to get this,
will any one please explain why we are using this.
thanks
sudha (2 Replies)
Hi, Anyone can help
My solaris 8 system has the following
/dev/null , /dev/tty and /dev/console
All permission are lrwxrwxrwx
Can this be change to a non-world write ??
any impact ?? (12 Replies)
Hi expert,
May I know what is the difference between below cron tab entry ?
0,12 * * * * /abc/myscript.sh > /dev/null 2>&1
0,12 * * * * /abc/myscript.sh (7 Replies)
How are these two different? They both prevent output and error from being displayed. I don't see the use of the "&"
echo "hello" > /dev/null 2>&1
echo "hello" > /dev/null 2>1 (3 Replies)
I apologize if this question has been answered else where or is too elementary.
I ran across a KSH script (long unimportant story) that does this:
if ; then
CAS_SRC_LOG="/var/log/cas_src.log 2>&1"
else
CAS_SRC_LOG="/dev/null 2>&1"
fithen does this:
/usr/bin/echo "heartbeat:... (5 Replies)
Hello All and a Happy New year to yous guys.
I'm running the below command on my AIX box and it keeps giving me the message that the file doesn't exist. I know the file don't exist, but I don't want to see the error. 2>/dev/null doesn't work.
bash-3.00$ ls -l C* | wc -l 2>/dev/null
ls:... (2 Replies)
Discussion started by: bbbngowc
2 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)