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) General Commands Manual look(1)NAME
look - Finds lines in a sorted list
SYNOPSIS
look [-df] [-tcharacter] string [file]
The look command prints all lines in a sorted file that begin with string.
OPTIONS
Uses dictionary order; only letters, digits, tabs, and spaces are used in comparisons. Searches without regard to case; treats uppercase
and lowercase as equivalent. Ignores character and characters following it in the search string. If you specify look -tC ABCDE, the
string ABCDE would become (in effect) AB, with CDE being ignored. This option is primarily for shell scripts, in which more than one
string is being processed.
DESCRIPTION
If no file is specified, look searches in the system word list /usr/share/dict/words, with the options -df assumed by default.
The look command uses binary search.
The -d and -f options affect comparisons as in sort.
NOTES
In order to use the -f option, you must first sort file with the sort -f command; otherwise, look displays only lowercase items.
If you do not specify -f, but specify a file (such as /usr/share/dict/words) that has been sorted with sort -f, look may not produce any
output.
EXAMPLES
To search a sorted file called sortfile for all lines that begin with the string as, enter: look as sortfile To search the system word list
for all words beginning with smi, enter: look smi
This might result in: smile smirk smith smithereens Smithfield Smithson smithy smitten
FILES
System word list.
SEE ALSO
Commands: grep(1), sort(1), spell(1)look(1)
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)