SQ(1) General Commands Manual SQ(1)NAME
sq, unsq - squeeze or unsqueeze a sorted word list
SYNOPSIS
sq < infile > outfile
unsq < infile > outfile
DESCRIPTION
sq compresses a sorted list of words (a dictionary). For example:
sort -u /usr/share/dict/words | sq | gzip -9 > words.sq.gz
will compress dict by about a factor of 5.
unsq uncompress the output of sq. For example:
gunzip < words.sq.gz | unsq | sort -f -o words
will uncompress a dictionary compressed with sq.
The squeezing is achieved by eliminating common prefixes, and replacing them with a single character which encodes the number of characters
shared with the preceding word. The prefix size is encoded as a single printable character: 0-9 represent 0-9, A-Z represent 10-35, and a-
z represent 36-61.
BUGS
sq and unsq can only handle words of up to 256 characters. The input must be sorted, and duplicates must be suppressed.
AUTHOR
Mike Wexler
SEE ALSO compress(1), sort(1).
LOCAL SQ(1)
Check Out this Related Man Page
LOOK(1) BSD General Commands Manual LOOK(1)NAME
look -- display lines beginning with a given string
SYNOPSIS
look [-dfa] [-t termchar] string [file]
DESCRIPTION
The look utility displays any lines in file which contain string as a prefix. As look performs a binary search, the lines in file must be
sorted (where sort(1) got the same options -d and/or -f that look is invoked with).
If file is not specified, the file /usr/share/dict/words is used, only alphanumeric characters are compared and the case of alphabetic char-
acters is ignored.
Options:
-d Dictionary character set and order, i.e. only alphanumeric characters are compared.
-f Ignore the case of alphabetic characters.
-a Use the alternate dictionary /usr/share/dict/web2
-t Specify a string termination character, i.e. only the characters in string up to and including the first occurrence of termchar are
compared.
The look utility exits 0 if one or more lines were found and displayed, 1 if no lines were found, and >1 if an error occurred.
FILES
/usr/share/dict/words the dictionary
/usr/share/dict/web2 the alternate dictionary
SEE ALSO grep(1), sort(1)COMPATIBILITY
The original manual page stated that tabs and blank characters participated in comparisons when the -d option was specified. This was incor-
rect and the current man page matches the historic implementation.
HISTORY
Look appeared in Version 7 AT&T Unix.
BSD June 14, 1993 BSD
I am having a problem with the following statement in a korn shell script:
if "$all_recs" = "ALL"; then
commands
fi;
I keep getting the error syntax error at line 999 : 'then' unmatched.
I'm sure it is a minor problem, but have been unable to find any answers online. Any help... (22 Replies)
Connected to oracle database
sqlplus << EOF
$CONNECTSTR
set heading off
set trimspool on
set feedback off
select ID,DATE from sysadm.TEST where VALUE = 'A' order by ID;
value_id = ID
value_date = DATE
EOF
1. Is it possible to reference the values, ID,DATE in unix shell script.
2.... (20 Replies)
When I'm running a few statements through mysql console, they are working just fine but when I'm trying to write some logic in php and trying to execute it, its awfully slow.. Its perhaps performing, 10 queries in 20 seconds... :( Why is this happening?
My table structures are:
Name:... (23 Replies)
I tried searching the forum for similar posts but its closed now.
Would appreciate any help on this.
I am trying to capture return value from a select query into a variable.
DB is Oracle
I am able to spool it to a file but I donot intend to use it.
Here is my script that does not work ;)
I... (27 Replies)
Hi,
I am very new to shell scripting and trying to write a simple shell script in which i am trying to achieve the following:
1. Connect to oracle database hosted on a different server
2. fire a query on the oracle db
3. store the output in a variable
4. use this variable for further logic... (26 Replies)
Hi there,
I have trouble selecting record that contain one biggest value for a group of other values. I mean, this is my table:
mysql> SELECT * FROM b;
+----+------+-------+
| id | user | value |
+----+------+-------+
| 1 | 1 | 100 |
| 3 | 1 | 150 |
| 5 | 1 | 300 |
| 6... (20 Replies)
Friends,
This is what I need:
I will pass a CSV file as an input, and I want my shell to be reading that CSV file, and based on the parameters it should generate SQLs and write those SQL in a different file in the same location.
I'm new to Shell scripting. I'm currently working on a... (25 Replies)
A recent Python upload on another site gave me the inspiration to do an unusual bash version...
This is a little tongue-in-cheek but an enjoyable bit of fun.
It took around 11 seconds to prove 90000000000 had a perfect square of 300000...
It is a stand alone program and has a degree of... (23 Replies)
Discussion started by: wisecracker
23 Replies
10. Post Here to Contact Site Administrators and Moderators
Hi, Just wanting to know if there is any issues today with the site. Initially I thought it is my internet connection or computer but regardless which one I use, the site has been slow and it is also not showing with the right fonts etc. I've been trying for the last 12+ hours and it's always been... (21 Replies)
Hello everyone,
I am having an issue here with CentOS release 6.6 (Final) that shows all of the space used up, but I can't tell where the space went.
Seemingly I am using up 100%, according to
df -h
Filesystem Size Used Avail Use% Mounted on... (27 Replies)
Only a few days after I coded this new feature from scratch, we are seeing over 3000 entries in the database from members (mostly guests) playing CS trivia.
I have spend a lot of time coding this (from scratch) and testing the API. From the logs, it seems to have an API bug which appears... (31 Replies)