Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to ignore mutiple strings when using shell script? Post 303043791 by jim mcnamara on Thursday 6th of February 2020 10:49:36 PM
Old 02-06-2020
You want alternation:
Code:
find / -name "$serviceitem" ! -size 0  -exec egrep -v "(tmp|docker|WinSxS|Permission|HISTORY|alternatives|bearer11ssl|manifest) \;"


Last edited by RavinderSingh13; 02-07-2020 at 12:01 AM..
 

10 More Discussions You Might Find Interesting

1. IP Networking

Script to assign mutiple IP's to 1 nic

I need a script to assign multiple IP addresses to a single nic. The machine is running CentOS. Any help would be appreciated. (2 Replies)
Discussion started by: ron310
2 Replies

2. Homework & Coursework Questions

strings in shell script!

hi ppl, I have a basic doubt as to how shell treats strings. e.g:given a line of data like this "5","6","45","77","89" extracting the value from each field to a variable will conatin a string("5") or just the number? If it conatins "5", how do we perform mathematical operations with that... (3 Replies)
Discussion started by: beetel
3 Replies

3. Shell Programming and Scripting

Shell script to replace strings to and from a file

Hello All, I have 2 files 1 ) source file eg asasa 1.2.3.4 adfhsdfsdfasdf zxzxzx 2.3.4.56 dsadasdasdsadasd kjjkjkjk 30.3.4.5 asdsadsadsadsadsad vxcvxcvx 1.2.3.4 qwewqewqeqweqwe 2) patern file 1.2.3.4 A 2.3.4.56 B 30.3.4.5 C I need the source to be changed to asasa A... (2 Replies)
Discussion started by: nitinkgoud
2 Replies

4. Shell Programming and Scripting

Find associated strings in a bash shell script

Hi together, unfortunately I am not a shell script guru - the following might touch the depths of awk, substr, split, regexps, where I am still fighting with - but as always the boss needs a fast solution :-( So: I have the following USER/PASSWORD-installation-config-file, from where I want to... (10 Replies)
Discussion started by: Sofie
10 Replies

5. Shell Programming and Scripting

Shell Script to ignore # and take corresponding user and group

Hi, I have a following file: role.IMPACT_USER.user=admin role.IMPACT_USER.user=dd12345 role.IMPACT_USER.user=ss76767 #role.IMPACT_USER.user=root #role.IMPACT_USER.group=System role.IMPACT_USER.group=ImpactUser #Description: Allow users to login in to Impact, start and stop service... (5 Replies)
Discussion started by: dbashyam
5 Replies

6. Shell Programming and Scripting

Ignore lines in Shell Script

Hi, I have a shell script, which reads a *.txt file - line by line. In this text file, I have some lines beginning with "#" that I want to ignore : MY_FILE #blah blah blah 1 blah blah blah 2 blah blah blah 3 #blah blah blah 4 I want my script to read only the following lines... (3 Replies)
Discussion started by: ad23
3 Replies

7. Shell Programming and Scripting

awk based script to ignore all columns from a file which contains character strings

Hello All, I have a .CSV file where I expect all numeric data in all the columns other than column headers. But sometimes I get the files (result of statistics computation by other persons) like below( sample data) SNO,Data1,Data2,Data3 1,2,3,4 2,3,4,SOME STRING 3,4,Inf,5 4,5,4,4 I... (9 Replies)
Discussion started by: ks_reddy
9 Replies

8. Shell Programming and Scripting

Shell script with mutiple steps/commands, on UNIX servers

Hi, I wrote a simple script, which will call other scripts or run commands on a UNIX server. my script has multiple steps/commands with some delay in between. I usually get some email notifications after the successful execution of each step. **My intention is to get email alerts when it is... (5 Replies)
Discussion started by: System Admin 77
5 Replies

9. Shell Programming and Scripting

Ignore Folder in Shell Script ?

Hi, I currently use a script to extract *.deb files located in a Directory called "/var/mobile/Media/Downloads" The Problem is howver I want the script to ignore the folder: "/var/mobile/Media/Downloads/New Debs and Files" (it shall NOT decompile any of the files in that folder. Here is... (2 Replies)
Discussion started by: pasc
2 Replies

10. Shell Programming and Scripting

Merge strings with ignore case

I have a bi-lingual database of a large number of dictionaries. It so happens that in some a given string is in upper case and in others it is in lower case. An example will illustrate the issue. toll Tax=पथ-कर Toll tax=राहदारी कर toll tax=टोल I want to treat all three instances of toll tax... (3 Replies)
Discussion started by: gimley
3 Replies
tkconrc(5)							File Formats Manual							tkconrc(5)

__________________________________________________________________________________________________________________________________________________

NAME
tkconrc - TkCon resource file DESCRIPTION
TkCon will search for a resource file in "~/.tkconrc". TkCon never sources the "~/.wishrc" file. The resource file is sourced by each new instance of the console. An example resource file is provided below. The file itself is a Tcl script, so it is required that the file conforms to Tcl script conventions. VARIABLES
Certain variables in TkCon can be modified to suit your needs. It's easiest to do this in the resource file, but you can do it when time the program is running (and some can be changed via the Prefs menu). All these are part of the master interpreter's ::tkcon namespace. The modifiable array variables are ::tkcon::COLOR and ::tkcon::OPT. You can call tkcon set ::tkcon::COLOR when the program is running to check its state. Here is an explanation of certain variables you might change or use: ::tkcon::COLOR(bg) The background color for tkcon text widgets. Defaults to the operating system default (determined at startup). ::tkcon::COLOR(blink) The background color of the electric brace highlighting, if on. Defaults to yellow. ::tkcon::COLOR(cursor) The background color for the insertion cursor in tkcon. Defaults to black. ::tkcon::COLOR(disabled) The foreground color for disabled menu items. Defaults to dark grey. ::tkcon::COLOR(proc) The foreground color of a recognized proc, if command highlighting is on. Defaults to dark green. ::tkcon::COLOR(var) The background color of a recognized var, if command highlighting is on. Defaults to pink. ::tkcon::COLOR(prompt) The foreground color of the prompt as output in the console. Defaults to brown. ::tkcon::COLOR(stdin) The foreground color of the stdin for the console. Defaults to black. ::tkcon::COLOR(stdout) The foreground color of the stdout as output in the console. Defaults to blue. ::tkcon::COLOR(stderr) The foreground color of stderr as output in the console. Defaults to red. ::tkcon::OPT(autoload) Packages to automatically load into the slave interpreter (i.e. 'Tk'). This is a list. Defaults to {} (none). ::tkcon::OPT(blinktime) The amount of time (in millisecs) that braced sections should blink for. Defaults to 500 (0.5 secs), must be at least 100. ::tkcon::OPT(blinkrange) Whether to blink the entire range for electric brace matching or to just blink the actual matching braces (respectively 1 or 0, defaults to 1). ::tkcon::OPT(buffer) The size of the console scroll buffer (in lines). Defaults to 512. ::tkcon::OPT(calcmode) Whether to allow expr commands to be run at the command line without prefixing them with expr (just a convenience). ::tkcon::OPT(cols) Number of columns for the console to start out with. Defaults to 80. ::tkcon::OPT(dead) What to do with dead connected interpreters. If dead is leave, TkCon automatically exits the dead interpreter. If dead is ignore then it remains attached waiting for the interpreter to reappear. Otherwise TkCon will prompt you. ::tkcon::OPT(exec) This corresponds to the -exec tkcon option (see tkcon(1)). ::tkcon::OPT(font) Font to use for tkcon text widgets (also specified with -font option). Defaults to the system default, or a fixed width equivalent. ::tkcon::OPT(gets) Controls whether tkcon will overload the gets command to work with tkcon. The valid values are: congets (the default), which will redirect stdin requests to the tkcon window; gets, which will pop up a dialog to get input; and {} (empty string) which tells tkcon not to overload gets. This value must be set at startup to alter tkcon's behavior. ::tkcon::OPT(history) The size of the history list to keep. Defaults to 48. ::tkcon::OPT(hoterrors) Whether hot errors are enabled or not. When enabled, errors that are returned to the console are marked with a link to the error info that will pop up in an minimal editor. This requires more memory because each error that occurs will maintain bindings for this feature, as long as the error is in the text widget. Defaults to on. ::tkcon::OPT(library) The path to any tcl library directories (these are appended to the auto_path when the after the resource file is loaded in). ::tkcon::OPT(lightbrace) Whether to use the brace highlighting feature or not (respectively 1 or 0, defaults to 1). ::tkcon::OPT(lightcmd) Whether to use the command highlighting feature or not (respectively 1 or 0, defaults to 1). ::tkcon::OPT(maineval) A tcl script to execute in the main interpreter after the slave interpreter is created and the user interface is initialized. ::tkcon::OPT(maxlinelen) A number that specifies the limit of long result lines. True result is still captured in $_ (and 'puts $_' works). Defaults to 0 (unlimited). ::tkcon::OPT(maxmenu) A number that specifies the maximum number of packages to show vertically in the Interp->Packages menu before breaking into another column. Defaults to 15. ::tkcon::OPT(nontcl) For those who might be using non-Tcl based Tk attachments, set this to 1. It prevents TkCon from trying to evaluate its own Tcl code in an attached interpreter. Also see my notes for non-Tcl based Tk interpreters. ::tkcon::OPT(prompt1) Like tcl_prompt1, except it doesn't require you use puts. No equivalent for tcl_prompt2 is available (it's unnecessary IMHO). Defaults to {([file tail [pwd]]) [history nextid] % }. ::tkcon::OPT(rows) Number of rows for the console to start out with. Defaults to 20. ::tkcon::OPT(scollypos) Y scrollbar position. Valid values are left or right. Defaults to right. ::tkcon::OPT(showmenu) Show the menubar on startup (1 or 0, defaults to 1). ::tkcon::OPT(showmultiple) Show multiple matches for path/proc/var name expansion (1 or 0, defaults to 1). ::tkcon::OPT(slaveeval) A tcl script to execute in each slave interpreter right after it's created. This allows the user to have user defined info always available in a slave. Example: set ::tkcon::OPT(slaveeval) { proc foo args { puts $args } lappend auto_path . } ::tkcon::OPT(slaveexit) Allows the prevention of exit in slaves from exitting the entire application. If it is equal to exit, exit will exit as usual, oth- erwise it will just close down that interpreter (and any children). Defaults to close. ::tkcon::OPT(subhistory) Allow history substitution to occur (0 or 1, defaults to 1). The history list is maintained in a single interpreter per TkCon con- sole instance. Thus you have history which can range over a series of attached interpreters. EXAMPLES
An example TkCon resource file might look like: ###################################################### ## My TkCon Resource File # Use a fixed default font #tkcon font fixed; # valid on unix #tkcon font systemfixed; # valid on win tkcon font Courier 12; # valid everywhere # Keep 50 commands in history set ::tkcon::OPT(history) 50 # Use a pink prompt set ::tkcon::COLOR(prompt) pink ###################################################### SEE ALSO
dump(n), idebug(n), observe(n), tkcon(1), tkcon(n) KEYWORDS
Tk, console COPYRIGHT
Copyright (c) Jeffrey Hobbs <jeff at hobbs.org> TkCon 2.5 tkconrc(5)
All times are GMT -4. The time now is 10:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy