strings(1) General Commands Manual strings(1)Name
strings - print ASCII strings in program
Syntax
strings [-|a] [-o] [-number] file...
Description
The command looks for ascii strings in a binary file. A string is any sequence of 4 or more printing characters ending with a newline or a
null.
The command is useful for identifying random object files and many other things.
Options
- or -a Looks through the entire object file for ASCII strings. Default is to look only in the initialized data space.
-number Sets the minimum string length to specified number of characters and default is 4.
-o Precedes each string with its file offset (octal).
See Alsood(1)strings(1)
Check Out this Related Man Page
strings(1) User Commands strings(1)NAME
strings - find printable strings in an object or binary file
SYNOPSIS
strings [-a | -] [-t format | -o] [-n number | -number] [file...]
DESCRIPTION
The strings utility looks for ASCII strings in a binary file. A string is any sequence of 4 or more printing characters ending with a new-
line or a null character.
strings is useful for identifying random object files and many other things.
OPTIONS
The following options are supported:
-a | - Look everywhere in the file for strings. If this flag is omitted, strings only looks in the initialized data space
of object files.
-n number | -number Use a number as the minimum string length rather than the default, which is 4.
-o Equivalent to -t d option.
-t format Write each string preceded by its byte offset from the start of the file. The format is dependent on the single
character used as the format option-argument:
d The offset will be written in decimal.
o The offset will be written in octal.
x The offset will be written in hexadecimal.
OPERANDS
The following operand is supported:
file A path name of a regular file to be used as input. If no file operand is specified, the strings utility will read from the stan-
dard input.
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of strings: LANG, LC_ALL, LC_CTYPE,
LC_MESSAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWtoo |
+-----------------------------+-----------------------------+
|CSI |Enabled |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO od(1), attributes(5), environ(5), standards(5)NOTES
The algorithm for identifying strings is extremely primitive.
For backwards compatibility, the options -a and - are interchangeable.
SunOS 5.10 20 Dec 1996 strings(1)
Hi
How do i compare two strings in shell script. Below is an example but I am not getting the desired output, plz help
if
then
echo success
fi
I am not getting the desired output if I do this. plz help (24 Replies)
Hi,
I'm having a requirement where I need to call a C program from a shell script and return the value from the C program to shell script.
I refered a thread in this forum. But using that command in the code, it is throwing an error
clear_text_password=$(get_password)
Error: bash:... (24 Replies)
Man it has been too long since I have had to do this type of stuff...
OK I have a file with lines in it looking like this:
bob:johnson:email@email.com (most lines)
john:F.:doe:email2@email.com (but some are like this)
I need to loop through and assign vars to the values:
var Fname =... (29 Replies)
ok, apparently this is a very difficult question to answer based on my searches on google that came up fruitless.
what i want to do is grep through a file for words that match a specified string.
but the thing is, i keep getting all words in the file that have the string in them.
say for... (27 Replies)
Hello , I want to Compare with 2 strings and get if they are True or not
please would like some help on this
#!bin/ksh
echo "Enter Name 1"
read Name1
echo "Enter Name 2"
read Name2
echo "------------------------"
echo "First Name: $Name1"
echo "Second Name: $Name2"
echo... (25 Replies)
I have a list of file names. However in some instances I might have a "-" at the beginning of the filename or an "=".
For example I might have something like this
set Lst = "file1 file2 file3 -file4 file5="
I want to pick up the ones having "-" at the beginning or "=" and store them in... (22 Replies)
Hi,
I have two strings eg:
string1=abc|def|hij
string2=12|13|14
I want a new string with
string3="abc:12 def:13 hij:14"
I am using shell scripting. Is there any method to do this?
I tried using cut command but this wont advance the respective strings.
Can anybody help in this... (31 Replies)
I have the following code and for some reason when I call the program using
/home/tcdata/tatsh/trunk/hstmy/bin/bash/raytrac.bash --cmod=jcdint.cmod
I get
hasArgument =
hasArgument = true
Somehow the array element is returning even though I have not chosen the option.
... (41 Replies)
Good evening to all!!
I'm facing this problem:
I saved in a txt a list of files name (one txt for every folder):
hello0.jpg
hello1.jpg
hello10.jpg
hello11.jpg
hello12.jpg
hello13.jpg
hello14.jpg
hello15.jpg
hello16.jpg
hello17.jpg
hello18.jpg
hello19.jpg
hello2.jpg
hello20.jpg... (32 Replies)
I have input file like
AAA
AAA
CCC
CCC
CCC
EEE
EEE
EEE
EEE
FFF
FFF
GGG
GGG
i was trying to retrieve data between two strings using sed.
sed -n /CCC/,/FFF/p input_file
Am getting output like
CCC
CCC
CCC (22 Replies)
Hi All,
Assuming i have got a file test.dat which has contains as follows:
Unix = abc def fgt jug
111 2222 3333
Linux = gggg pppp qqq
C# = ccc ffff llll
I would like to traverse through the file, get the 1st occurance of "=" and then need to get the sting... (22 Replies)
Hi
I have no experience in Unix so any help would be appreciated
I have the flowing text
235543
123
45654
199
225
578
45654
199
225
I need to find this sequence from A file
45654
199
225 (22 Replies)
Hello, I am trying to concatenate two strings by merging the overlapped region. E.g.
Seq1=ACGTGCCC
Seq2=CCCCCGTGTGTGT
Seq_merged=ACGTGCCCCCGTGTGTGTFunction strcat(char *dest, char *src) appends the src string to the dest string, ignoring the overlapped parts (prefix of src and suffix of dest).... (30 Replies)
Within my text file i have several thousand lines of text with some lines containing duplicate strings/words. I would like to entirely remove those lines which contain the duplicate strings.
Eg;
One and a Two
Unix.com is the Best
This as a Line Line
Example duplicate sentence with the word... (22 Replies)