Search Results

Search: Posts Made By: guitarscn
34,494
Posted By bartus11
Try:#!/bin/ksh usage () { echo "...
Try:#!/bin/ksh

usage ()
{
echo " Usage: $0 <opt1> <opt2> <opt3> <opt4>"
}

if [ $# -lt 3 ]; then
usage
exit;
fi

if [ -z $4 ]; then
prog -a $1 -b $2 -c $3 2>&1 |...
34,494
Posted By jlliagre
Or the shorter: #!/bin/ksh usage () {...
Or the shorter:

#!/bin/ksh

usage ()
{
echo " Usage: $0 <opt1> <opt2> <opt3> [<opt4>]"
}

[[ $# -lt 3 ]] && { usage; exit; }

prog -a $1 -b $2 -c $3 ${4:+-d $4} 2>&1 | tee -a ~/$1.log
11,471
Posted By radoulov
Sorry, so try: :set wrapmargin=15 for...
Sorry,
so try:

:set wrapmargin=15
for existing text:

%!fmt -80
13,210
Posted By birei
Hi, Here a 'sed' script. I don't know if it...
Hi,

Here a 'sed' script. I don't know if it could work under a BSD. My machine is a Linux one.

$ cat infile
1
3
4

$ cat script.sed
2 i\
2

$ sed -f script.sed infile
1 ...
13,210
Posted By agama
In my opinion, this is a job for awk rather than...
In my opinion, this is a job for awk rather than sed.

Assuming that tokens are numeric, and are always column one, then:


#!/usr/bin/env ksh
awk '
{
if( last )
...
Showing results 1 to 5 of 5

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