I have the following script:
mysort.sh:
#!/bin/ksh
for i in `ls`
sort -bfu $i > sort_$i
wait
mv sort_$i $i
wait
done
exit 0
I get the following error:
mysort.sh: syntax error at line 3 : `sort' unexpected
Does anybody know what I am missing here. ... (2 Replies)
Hi All,
I probably miss something fundamental here.
I want to rename a bunch of files in subdirectories (that might contain white spaces) with names that are related.
I thought following could do the job:
find . -name *.sh -exec mv {} $(echo {} | sed -e 's/0/1/g') \;
Now to be able to... (5 Replies)
I am in the process of writing a script to change the grub password in the grub.conf file. I thought I had it figured out, but am running into an a problem I can't put my finger on.
Command I am running when I find that the grub.conf file contains "password --md5".
sed... (1 Reply)
Hi I'm just learning programming and need some help.
I've taken a data file which has a list of numbers eg:
3
5
32
533
13
2
And I've used sort -n and to sort and then piped it to awk to arrange into an array.
#!/bin/sh
sort -n data.txt |
awk '
{
array=$1
} (4 Replies)
I hv a file --am executing a script which is giving me unexpected results
COntents of file:
f1
CMT_AP1_CONT:/opt/sybase/syboc125:150:ASE12_5::Y:UX:
CMT_AP1:/opt/sybase/syboc125:150:ASE12_5::Y:UX
f1.tmp
CMT_AP1_CONT:/opt/sybase/syboc125:150:ASE12_5::Y:UX:... (2 Replies)
Hi,
I'm trying to sort a text file "test":
S12
S_S12
S_S1_12
S15
S_N15
S_N1_15
By "sort test", I get:
S12
S15
S_N1_15
S_N15
S_S1_12
S_S12
It seems weird:
Comparing Line 2 and Line 3, it must be that '-' is bigger than '1'; however, comparing Line 3 and Line 4, it seems that... (3 Replies)
Hi,
Trying to sort grep result based on timestamp of the filename.
I have the following result and want to sort them on timestampgrep -i 'ERROR' *log*2013*
s_m_xxx_xxx_xxx_xxx_xxxx.log.20130906092431:TRANSF_1_1_1> DBG_21216 Finished transformations for Source Qualifier . Total errors ... (5 Replies)
Hi! all here is my code
which is working fine no errors but I want to know how to take result and input to other program
awk 'FNR==1{i++}{LC=NR}
{for(k=1; k<=NF; k++) A=$k}
END{for (i=1;i<=LC;i++)
{
for(j=1;j<=LC;j++)
if(A=='$UID' && A>='$MX'+A &&... (7 Replies)
Hello,
I am new to Unix and would like to seek a help, please.
I have 2 files (file_1 and file_2), I need to perform the following actions.
1 ) Sort the both file by the column 26-36 (which is Invoice number)
what is sort command with the column sort?
2) Compare the file_1.sorted and... (3 Replies)
Hello,
Giving those commands:
cat > myfile
1
2
3
^D
cat myfile | awk '{ s=s+$1 ; print s}'
The output is:
1
3
6
It seems like this command iterates each time on a different row so $1 is the first field of each row.. But what caused it to refer to each row ?.
What I mean... (3 Replies)
Discussion started by: uniran
3 Replies
LEARN ABOUT MINIX
kermit
This is a slightly lobotomized kermit. The help command, thescript facility, and the automatic dial support have been re-
moved. The ? and ESC commands still work, so there is still rea-
sonable built-in help. The only V7 kermit feature that does not
work is the ability to see whether there are input characters
waiting. This means that you will not be able to ask for statusduring a file transfer (though this is not critical, because ker-mit prints a dot every so often and other special characterswhenever there is an error or timeout). Start kermit, and thentype the following to open a 2400 baud session, for example:
(It is more convenient if you put these commands in .kermrc in
your home directory, so that they get done automatically wheneveryou run kermit.) This will connect you to the modem or whateveron the serial port. Now log into the other system. When you
want to transfer files, run kermit on the other system. To it,type This puts its kermit into a sort of slave mode where it ex-pects commands from the kermit running on your MINIX system. Nowcome back to the command level on MINIX kermit, by typing the es-cape character followed by c. (Kermit will tell you the currentescape character when you do the connect command.) At this pointyou can issue various commands. Your kermit will coordinatethings with kermit on the other machine so that you only have to
type commands at one end. Common commands areFilenames can include wildcards. By default, kermit works in a
system-independent, text mode. (In effect it assumes that thewhole world is MS-DOS and converts end of line and file names ac-cordingly.) To send binary files, you will want to type on bothends before starting any transfers. This disables CR LF to new-line conversion. If both of your systems are some flavor of
UNIX, you might as well put this in .kermrc on both ends and runin binary mode all the time. Also, if both systems are UNIX it
is recommended that you use on both ends. This causes it to keepfile names unchanged, rather than mapping to legal MS-DOS names.Here is a typical .kermrc for use onOn the other end of the line, for example, the host at your localcomputer center to which you want to transfer files, a typicalprofile might be:
Kermit has many other options and features. For a pleasant andhighly readable description of it, see the following book:
Title: Kermit: A File Transfer Protocol
Author: Frank da Cruz
Publisher: Digital Press
Date: 1987
ISBN: 0-932376-88
For information about recent kermit developments, versions forother systems, and so forth, please contact:
Christine M. Gianone
Manager, Kermit Development and Distribution
University Center for Computing Activities
Columbia University
612 West 115th Street
New York, N.Y. 10025
Over 400 versions of kermit are available, so it is likely thereis one for any computer your system might want to talk to. Co-lumbia University also publishes a newsletter about kermit thatcan be requested from the above address.