09-03-2010
Edit: Actually, I think this would work! Another solution.
Mike
Last edited by Michael Stora; 09-03-2010 at 06:55 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
i have a string like echo "a|b|c" . i want to count the | symbols in this string . how to do this .plz tell the command (11 Replies)
Discussion started by: kamesh83
11 Replies
2. Shell Programming and Scripting
Hi folks,
I have a text file that I need to parse, and I cant figure it out. The source is a report breaking down softwares from various companies with some basic info about them (see source snippet below). Ultimately what I want is an excel sheet with only Adobe and Microsoft software name and... (5 Replies)
Discussion started by: rowie718
5 Replies
3. Shell Programming and Scripting
I am parsing a nagios config, searching for a string, and then printing the line 2 lines later (the "members" string). Here's the data:
define hostgroup{
hostgroup_name chat-dev
alias chat-dev
members thisisahostname
}
define hostgroup{
... (1 Reply)
Discussion started by: mglenney
1 Replies
4. Shell Programming and Scripting
Please check the attachment for the example.
Purpose: count how many "|" character in one line and also display the line number.
expect result:
Line 1 : there are 473 "|" characters
Line 2 : there are 473 "|" characters
I have tried to use awk to count it, it's ok when the statistic... (8 Replies)
Discussion started by: ambious
8 Replies
5. Shell Programming and Scripting
Sample file:
This is line one,
this is another line,
this is the PRIMARY INDEX line
l ;
This is another line
The command should find the line with “PRIMARY INDEX” and remove the last character from the line preceding it (in this case , comma) and remove the first character from the line... (5 Replies)
Discussion started by: KC_Rules
5 Replies
6. Shell Programming and Scripting
Hi ,
I am doing some enhancements in an existing shell script. There it used the awk command in a function as below :
float_expr() {
IFS=" " command eval 'awk "
BEGIN {
result = $*
print result
exit(result == 0)
}"'
}
It calls the function float_expr to evaluate two values ,... (1 Reply)
Discussion started by: mady135
1 Replies
7. Shell Programming and Scripting
Hi,
I have a file with more than 1000 lines. Most of the lines have 16 characters. I want to find out lines that have less than 14 characters (usually 12 or 13).
wc -l gives me the line count and wc -c gives me the total characters in a file. I could not get the total characters for each line.... (1 Reply)
Discussion started by: bobbygsk
1 Replies
8. Shell Programming and Scripting
Hello All,
I got a requirement when I was working with a file. Say the file has unloads of data from a table in the form
1|121|asda|434|thesi|2012|05|24|
1|343|unit|09|best|2012|11|5|
I was put into a scenario where I need the field count in all the lines in that file. It was simply... (6 Replies)
Discussion started by: PikK45
6 Replies
9. UNIX for Dummies Questions & Answers
I need the character count of the last line of each file in a directory, and not the total.
Now I have been doing this but unfortunately, -exec doesn't support pipes:
find sent/ -type f -exec tail -1|wc -c {} \;
If I try this:
find sent/ -type f -exec tail -1 {} \; | wc -c
It will give... (6 Replies)
Discussion started by: MIA651
6 Replies
10. Shell Programming and Scripting
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Discussion started by: teokon90
10 Replies
LEARN ABOUT DEBIAN
fvwmbacker1
FvwmBacker(1) General Commands Manual FvwmBacker(1)
NAME
FvwmBacker - the FVWM background changer module
SYNOPSIS
FvwmBacker is spawned by fvwm, so no command line invocation will work.
DESCRIPTION
The FvwmBacker module provides functionality to change the background when changing desktops. Any command can be executed to change the
backgrounds. The commands used to change the backgrounds must exit after changing the root window, (i.e. 'xv -root zzz.gif' does not,
without the -quit option) otherwise FvwmBacker will hang.
COPYRIGHTS
The FvwmBacker module is the original work of Mike Finger.
Copyright 1994, Mike Finger. The author makes no guarantees or warranties of any kind about the use of this module. Use this modules at
your own risk. You may freely use this module or any portion of it for any purpose as long as the copyright is kept intact.
INITIALIZATION
During initialization, FvwmBacker will scan the same configuration file that FVWM used during startup to find the options that pertain to
it. These options are discussed in a later section.
INVOCATION
FvwmBacker can be invoked by fvwm during initialization by inserting the line 'Module FvwmBacker' in the .fvwmrc file.
FvwmBacker must reside in a directory that is listed in the ModulePath option of FVWM for it to be executed by FVWM.
CONFIGURATION OPTIONS
The follow option is the only only support at present
*FvwmWinListDesk DeskNumber command
Specifies the command to execute when the specified DeskNumber becomes active.
If the command begins with -solid FvwmBacker uses the next argument as a color in the X database and sets the background to that
color without generating a system call to xsetroot. Only single word color names may be used.
SAMPLE CONFIGURATION
The following are excepts from a .fvwmrc file which describe FvwmBacker initialization commands:
####
# Set Up Backgrounds for different desktops.
####
*FvwmBackerDesk 0 -solid steelblue
*FvwmBackerDesk 1 -solid midnightblue
*FvwmBackerDesk 2 -solid yellow
*FvwmBackerDesk 3 xpmroot /usr/include/X11/pixmaps/background2.xpm
AUTHOR
Mike Finger (mfinger@mermaid.micro.umn.edu)
(Mike_Finger@atk.com)
(doodman on IRC, check the #linux channel)
Modified by
Andrew Davison (davison@cs.monash.edu.au)
3rd Berkeley Distribution September 8th, 1994 FvwmBacker(1)