Sponsored Content
Top Forums Shell Programming and Scripting To count underscore in filename Post 302941977 by ginrkf on Thursday 23rd of April 2015 09:36:10 AM
Old 04-23-2015
To count underscore in filename

Hi All

I have a filename like below
Code:
adsf_ghjt_kop_pol.csv

Can you please get me a command for counting the number of underscore in the filename.

In the above filename I should get output as 3, since the file name is having three underscore
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Count caraters on filename

Hello people. I need some help to do this: I've got some files that i need to count the caracters of filenames. 20080209_2000591574_237004076372.xml 20080202_1360584_267002636042.xml The minimum is 15 . If some file with less must move them to another directory. Obviously these... (3 Replies)
Discussion started by: osramos
3 Replies

2. Shell Programming and Scripting

usage of underscore in awk

Hi what is the purpose of using underscore in awk. I suppose it is for defining macro's and reducing repeatation but can some one show me an example? (6 Replies)
Discussion started by: ahmedwaseem2000
6 Replies

3. Shell Programming and Scripting

allow only alphnumeric entry and an underscore

I am taking an user input which should only be an alphanumeric character or an underscore. How to i do it? (2 Replies)
Discussion started by: vickylife
2 Replies

4. Shell Programming and Scripting

Filename pattern count

Hi I have the following files in a directory - ds_pl_W_Test ds_pl_list_Test ds_pl_list_Test ds_pl_listl_Test ds_pl_file_Test ds_pl_xx_Test I would like to count the number files in the directory that contain the word "list" I tried the following but it returns zero - ... (3 Replies)
Discussion started by: Prega
3 Replies

5. UNIX for Advanced & Expert Users

google search changes with an underscore

How does adding an underscore change a google search? I was searching for John Elway and got different results with and without an unscore. (3 Replies)
Discussion started by: cokedude
3 Replies

6. Shell Programming and Scripting

Changing the character after the Underscore(_)

Hi Everyone, I am looking for a command that would do the following: 1) Change all the letters/words in a file to Lower case Letters/words. 2) Remove the Underscore (_) and Change the Character after the underscore (_) to an Uppercase letter. Example: File contains the below words: ... (5 Replies)
Discussion started by: filter
5 Replies

7. Shell Programming and Scripting

underscore to dots

Hi, I have been trying to change underscores to dots. For example: 1122_91 1022_233 . 2237_23 9382_2339 2998_234 345_257 . . Desired output: 1122.91 1022.233 . 2237.23 9382.2339 2998.234 345.257 . . Any idea? Thanks (4 Replies)
Discussion started by: iconig
4 Replies

8. Shell Programming and Scripting

Finding a certain character in a filename and count the characters up to the certain character

Hello, I do have folders containing having funny strings in their names and one space. First, I do remove the funny strings and replace the space by an underscore. find . -name '* *' | while read file; do target=`echo "$file" | sed 's/... (2 Replies)
Discussion started by: tempestas
2 Replies

9. HP-UX

sed help with underscore problems

Hello, I have spent a couple of hours trying to answer this myself, so forgive me if the answer is simple but I have tried. I have a text file generated from svn log output which contains a list of files. Two regexps im using are * and * They both work but some lines has a mixture... (7 Replies)
Discussion started by: YogaBija
7 Replies

10. Shell Programming and Scripting

File Count and FileName

Hi I have a set of files in one directory like below FIN_TASK1.csv FINA_TASK2.csv FIN_TASK3.csv. I want a command to print the count in each file and the correspong file name into one file.My expected output is given below cat filcount.txt 2 "FIN_TASK1.csv" 4 "FIN_TASK2.csv" ... (3 Replies)
Discussion started by: ginrkf
3 Replies
glabels(1)						      General Commands Manual							glabels(1)

NAME
glabels - Label and business card creation program for GNOME SYNOPSIS
glabels-3 [OPTIONS] [label-filename...] glabels-3-batch [OPTIONS] [label-filename...] DESCRIPTION
glabels-3 is a lightweight program for creating labels and business cards for the GNOME desktop environment. It is designed to work with various laser/ink-jet peel-off label and business card sheets that you'll find at most office supply stores. glabels-3 is pre-configured with templates for many of these products. It also provides an interactive template designer for creating new templates according to user specifications. For full documentation see the gLabels online help. glabels-3-batch is a command line utility to print labels previously prepared with glabels-3. OPTIONS
-?, --help Display a summary of available command-line options. --usage Display a short usage summary. -v, --version Print program version information. Options specific to glabels-batch -o filename, --output=filename Set output filename to filename. (default="output.ps") -i filename, --input=filename Set name of file with data to be merged to filename. Typically this is a .csv file containing values to be printed on the labels. -s n, --sheets=n Set number of sheets to n. (default=1) -c n, --copies=n Set number of copies to n. (default=1) -f n, --first=n Set label on first sheet to start printing from to n. (default=1) -l, --outline Print outlines around labels. This is useful for testing printer alignment or printing proof sheets. -C, --cropmarks Print crop marks. Helpful for cutting up sheets. -r, --reverse Print mirror image of labels. This is useful for clear labels intended to be seen from the back through glass. FILES
The $HOME/.glabels directory contains all user-defined templates. SEE ALSO
The gLabels homepage at <http://glabels.org/>. AUTHOR
Jim Evins <evins@snaught.com> Jun 28, 2004 glabels(1)
All times are GMT -4. The time now is 03:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy