New answers tagged

0

Comments to the contrary, if you do an stty sane on HPUX, the kill character is (re)set to @. erase is set to # intr is set to ASCII DEL (often shown as ^?) That was from testing HPUX 11.11, 11.23 and 11.31 (other systems such as AIX and Solaris also have quirks like this). Further reading: stty defaults on various unix flavours After using @, line ...


2

grep -lZ max graham/quant/*.biz | xargs -0r maximum.sh grep -lZ milan graham/quant/*.biz | xargs -0r milan.sh grep -lZ min graham/quant/*.biz | xargs -0r minimum.sh Note: requires GNU grep for the -Z option to output NUL-separated filenames. These lines use grep's -l option to output a list of files containing the wanted pattern (max, milan, or min), ...


1

As the users says it is using an ancient unix shell, lets try another version of the script: #!/bin/sh #test version for ancient shell. cd graham/quant for file in *.biz do grep -q "max" "$file" if [ "$?" = "0" ]; then maximum.sh "$file" fi grep -q "milan" "$file" if [ "$?" = "0" ]; then milan.sh "$file" fi grep -q "min" "...


4

The easiest way to see this is to use something like od -c which prints all characters: $ echo 123456 | od -c 0000000 1 2 3 4 5 6 \n 0000007 $ printf 123456 | od -c 0000000 1 2 3 4 5 6 0000006 As you can see, echo prints an extra \n but printf doesn't. wc -c counts bytes, it doesn't care whether the character in question can be ...


1

You should use: alias mov 'cd "$use"/\!*/src' !* in csh/tcsh alias resolves to all arguments of the command being run (i.e. what you put after mov). See Writing Aliases in csh and tcsh for other options: !! is the whole command line !* is all the arguments of the command !:1 is the first argument of the command !:2 is the second argument of the command ...



Top 50 recent answers are included