10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can somebody help me on below question
I have path and i want to select first two directory name in variable how we can do this.
i want to select /Myname/xyz in variable.
Quick help will be appriciated.
Thanks in advance
Kumar (10 Replies)
Discussion started by: yadavricky
2. Shell Programming and Scripting
How can I display only one shortest path (A/B/configure)?
$ grep configure file.txt
Thank you. (9 Replies)
Discussion started by: hce
3. Shell Programming and Scripting
I have a string that looks like:
options="arguments: --user=alpha --group=beta --prefix=/usr/share --proxy-path=/proxy --proxy-tmp=/tmp --conf-path=/etc"
My goal is to transform the string into an array, then for each key, if it starts with "--proxy" to print the string... (2 Replies)
Discussion started by: TECK
4. Shell Programming and Scripting
Greetings everyone. Right now I am working on a script to be used during automated deployment of servers. What I have to do is remove localhost.localdomain and localhost6.localdomain6 from the /etc/hosts file. Simple, right? Except most of the examples I've found using sed want to delete the entire... (4 Replies)
Discussion started by: msarro
5. Shell Programming and Scripting
let's start by giving you guys a few examples of the text:
TEXT and ABC can be and I... (5 Replies)
Discussion started by: TehOne
6. Shell Programming and Scripting
Hi there, i wonder, is it possible to use regular expressions to partially select a string?
I have a bunch of server names which look like this
I want to extract up to and including the 'z' in the server name, so for example
... (4 Replies)
Discussion started by: hcclnoodles
7. Shell Programming and Scripting
For a field format such as AAL1001_MD82, how do I select(and use in if statement) only the last four elements( in this case MD82) or the first three elements (in this case AAL)?
For instance, how do I do the following - if first three elements of $x == yyy, then ... (5 Replies)
Discussion started by: akshaykr2
8. Shell Programming and Scripting
I am new to this world of shell programming. I am facing a problem that is :
I have directory which has many sub directories at different depth. say
In this directory structure there exists a file called ".project" in some of the sub... (2 Replies)
Discussion started by: bhaskar_m
9. Shell Programming and Scripting
With shell script I'm trying to split the string into two parts. One is alphanumeric part, the other one is a numeric part.
dummy_postcode_1 = 'SL1'
--> res_alpha = 'SL' and res_numeric = '1'
dummy_postcode_2 = 'S053'
--> res_alpha = 'S' and res_numeric = '053' ... (1 Reply)
Discussion started by: ozgurgul
10. Shell Programming and Scripting
Seems I'm inundating this forum with questions, but anyway:
I am writing a script that should accept one and only one argument when called.
That argument should designate a file, either with path/filename or just filename.
Now to the difficult bit:
I want to figure out a way to store... (9 Replies)
Discussion started by: ropers
SLOCATE(1) General Commands Manual SLOCATE(1)
slocate - Security Enhanced version of the GNU Locate
slocate [-qi] [-d <path>] [--database=<path>] <search string>
slocate [-i] [-r <regexp>] [--regexp=<regexp>]
slocate [-qv] [-o <file>] [--output=<file>]
slocate [-e <dir1,dir2,...>] [-f <fstype1,...>] <[-l <level>] [-c] <[-U <path>] [-u]>
slocate [-Vh] [--version] [--help]
Secure Locate provides a secure way to index and quickly search for files on your system. It uses incremental encoding just like GNU
locate to compress its database to make searching faster, but it will also store file permissions and ownership so that users will not see
files they do not have access to.
This manual page documents the GNU version of slocate. slocate Enables system users to search entire filesystems without displaying
-u Create slocate database starting at path /.
Create slocate database starting at path <dir>.
Exclude directories from the slocate database.
Exclude files on specific file systems from the slocate database.
-c Parse '/etc/updatedb.conf' when updating the slocate database.
Security level. 0 turns security checks off. This will make searchs faster. 1 turns security checks on. This is the default.
-i Does a case insensitive search.
-q Quiet mode. Error messages are suppressed.
Limit the amount of results shown to <num>.
--regexp=<regexp> Search the database using a basic POSIX regular expression.
--output=<file> Specifies the database to create.
--database=<path> Specifies the path of databases to search in.
-h --help Display this help.
-v --verbose Verbose mode. Display files when creating database.
-V --version Display version.
Secure Locate v2.6
Kevin Lindsay - Copyright (c) 1999, 2000
Report any bugs to firstname.lastname@example.org