Hi all,
Consider i have a directory /tmp/test and inside this directory i have the following files:
1.svf.tmp
2.svf.tmp
3.svf.tmp
How can i remove the last four characters of every file in irder for the directory to be as:
1.svf
2.svf
3.svf
I use the following command but id doesn't... (6 Replies)
Hi there,
I'd like to write a script that removes any set of character from any string. The first argument would be the string, the second argument would be the characters to remove. For example:
$ myscript "My name's Santiago. What's yours?" "atu"
My nme's Snigo. Wh's yors?
I wrote the... (11 Replies)
Hello all,
I have a string var which contains formatting characters at the end, it is a string with EScape sequences at the end of it.
How can I remove them so that I only keep the 'real' text?
I tried :
var1=${var1%%\033[0m}
does not seem to do the job ....
Please help
Thanks (2 Replies)
I am running a script where one of the variables (the month and year) is input at the command line. What I would like to do is chop off the last few characters of that string to create a new variable, while maintaining the old one.
The script is run like this:
./pull_station_v4.csh KYWST... (3 Replies)
Hi.
for the following line:
Var1=${Array}
now Array has text as "{hello there}"
how do I remove the {} brackets before assigning the string to Var1?
Thanks. (3 Replies)
Hi
I am new in shell scripting and i want to manipulate a string.
I have a string tha looks like: /home/nteath/file.txt
I want to remove everything until the last "/" , to keep only the filename.
e.g. /home/nteath/file.txt
output: file.txt
Thanks (2 Replies)
Hello Folks..
I need your help ..
here the example of my problem..i know its easy..i don't all the commands in unix to do this especiallly sed...here my string..
dwc2_dfg_ajja_dfhhj_vw_dec2_dfgh_dwq
desired output is..
dwc2_dfg_ajja_dfhhj
it's a simple task with tail... (5 Replies)
Hi All,
I have a variable like
AVAIL="\
BACK:bkpstg:testdb3.iad.expertcity.com:backtest|\
#AUTH:authstg:testdb3.iad.expertcity.com:authiapd|\
TEST:authstg:testdb3.iad.expertcity.com:authiapd|\
"
What I want to do here is that If a find # before any entry, remove the entire string... (5 Replies)
Hi,
I have string like this ="Lookup Procedure"
But i want the output like this Lookup Procedure
=," should be removed.
Please suggest me the solution.
Regards,
Madhuri (2 Replies)
I have this fastq file:
@M04961:22:000000000-B5VGJ:1:1101:9280:7106 1:N:0:86
GGGGGGGGGGGGCATGAAAACATACAAACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCAACAGCTTTATCAATACCATGAAAAATATCAACCACACCA
+test-1
GGGGGGGGGGGGGGGGGCCGGGGGFF,EDFFGEDFG,@DGGCGGEGGG7DCGGGF68CGFFFGGGG@CGDGFFDFEFEFF:30CGAFFDFEFF8CAF;;8... (10 Replies)
Discussion started by: Xterra
10 Replies
LEARN ABOUT FREEBSD
strings
STRINGS(1) BSD General Commands Manual STRINGS(1)NAME
strings -- print the strings of printable characters in files
SYNOPSIS
strings [-a | --all] [-e encoding | --encoding=encoding] [-f | --print-file-name] [-h | --help] [-n number | --bytes=number | -number] [-o]
[-t radix | --radix=radix] [-v | --version] [file ...]
DESCRIPTION
For each file specified, the strings utility prints contiguous sequences of printable characters that are at least n characters long and are
followed by an unprintable character. The default value of n is 4. By default, the strings utility only scans the initialized and loaded
sections of ELF objects; for other file types, the entire file is scanned. The strings utility is mainly used for determining the contents
of non-text files.
If no file name is specified as an argument, standard input is read.
The following options are available:
-a | --all
For ELF objects, scan the entire file for printable strings.
-e encoding | --encoding=encoding
Select the character encoding to be used while searching for strings. Valid values for argument encoding are:
s for single 7-bit-byte characters (ASCII, ISO 8859).
S for single 8-bit-byte characters.
l for 16-bit little-endian.
b for 16-bit big-endian.
L for 32-bit little-endian.
B for 32-bit big-endian.
The default is to assume that characters are encoded using a single 7-bit byte.
-f | --print-file-name
Print the name of the file before each string.
-h | --help
Print a usage summary and exit.
-n number | --bytes=number | -number
Print the contiguous character sequence of at least number characters long, instead of the default of 4 characters.
-o Equivalent to specifying -t o.
-t radix | --radix=radix
Print the offset from the start of the file before each string using the specified radix. Valid values for argument radix are:
d for decimal
o for octal
x for hexadecimal
-v | --version
Display a version identifier and exit.
EXIT STATUS
The strings utility exits 0 on success, and >0 if an error occurs.
EXAMPLES
To display strings in /bin/ls use:
$ strings /bin/ls
To display strings in all sections of /bin/ln use:
$ strings -a /bin/ln
To display strings in all sections of /bin/cat prefixed with the filename and the offset within the file use:
$ strings -a -f -t x /bin/cat
SEE ALSO ar(1), nm(1), objdump(1), ranlib, readelf(1), size(1)HISTORY
The first FreeBSD strings utility appeared in FreeBSD v3. It was later discontinued in FreeBSD v5, when i386-only a.out format was dropped in
favor of ELF.
AUTHORS
The strings utility was re-written by S.Sam Arun Raj <samarunraj@gmail.com>. This manual page was written by S.Sam Arun Raj
<samarunraj@gmail.com>.
BSD December 19, 2011 BSD