Sponsored Content
Top Forums Shell Programming and Scripting No. of underscores in a file name Post 302853089 by bartus11 on Friday 13th of September 2013 07:25:24 AM
Old 09-13-2013
Try:
Code:
find . -name "*_*_*"

This User Gave Thanks to bartus11 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

change spaces to underscores script !!!

Hi everybody! Im not good in scripting and I need a script to take all the files with spaces in their names and change it to underscores. alice cooper.mp3 >> alice_cooper.mp3 Thanks in advance. (2 Replies)
Discussion started by: piltrafa
2 Replies

2. Shell Programming and Scripting

Scripting to convert underscores to spaces

Greetings, I have a bunch of music files that I want to strip the underscores out, and leave only spaces. All that I've found on the web is how to add underscores to files that have spaces, and reversing the "tr" command does not make a difference. Here is how to convert spaces to... (6 Replies)
Discussion started by: brakeb
6 Replies

3. Shell Programming and Scripting

extract string from file name between two underscores

Hi, Here is my question, I need to extract string between two underscores from the filename for example, filename is atmos_8xdaily_instant_300x300_1_12.nc what I want to extract is 300x300. There are many such files in my directory, so I guess the code should be like: for file... (7 Replies)
Discussion started by: 1988PF
7 Replies

4. Shell Programming and Scripting

Match list of strings in File A and compare with File B, C and write to a output file in CSV format

Hi Friends, I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving... File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies

5. Shell Programming and Scripting

How to find no of underscores in a variable?

Hi i have a variable var=a_b_c i want command to find no. of underscores in a variable Thank you (7 Replies)
Discussion started by: pracheth
7 Replies

6. UNIX for Dummies Questions & Answers

Appending "_" (underscores) to variable names

Hello, I have a file, inputs.list that contain prefixes to files that are inputs for a program inputs.list A B C D E ... My files are of the format A_1, A_2, B_1, B_2 and so on. I am planning to run a shell script that takes each line from the above file and feed it to the runProg.sh... (3 Replies)
Discussion started by: Gussifinknottle
3 Replies

7. Shell Programming and Scripting

Compare 2 text file with 1 column in each file and write mismatch data to 3rd file

Hi, I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file. File1 - file2 = file3 wc -l file1.txt 58112 wc -l file2.txt 55260 head -5 file1.txt 101214200123 101214700300 101250030067 101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies

8. Shell Programming and Scripting

How to separate data with varying amounts of underscores?

All, I've searched and haven't found a solution for my particular issue. I have a file with lines of data that contain varying amounts of underscores imbedded. But all the strings have a final underscore and an interface name: dmk_hcn_dalian2.XXXX.XXX.XX.COM_Se0/0/0... (4 Replies)
Discussion started by: turk22
4 Replies

9. Shell Programming and Scripting

Replace spaces with underscores up to first comma but not after the comma

I have a comma delimited file of major codes and descriptions. I want to replace all occurrences of spaces with underscores up to the first comma (only in the first field), but not replace spaces following the comma. For instance I have the following snippet of the file: EK ED,Elementary and... (7 Replies)
Discussion started by: tdouty
7 Replies

10. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
SYSTRAQ(8)							  [FIXME: manual]							SYSTRAQ(8)

NAME
systraq - monitors your system and warns you when files change SYNOPSIS
systraq DESCRIPTION
systraq is part of the systraq package, a set of scripts that monitors your system for file changes. It is meant to be run by a cronjob, not directly. systraq runs various system commands, to inspect the state of the system: what is it doing now?, what has it been doing recently?, are we running to hardware limitations?. Furthermore, it runs commands to inspect some files in users' homedirectories, as well as some system files, for frequently seen flaws. All these commands are maintained in little scripts in /etc/systraq/systraq.d. The first two characters of the script's name are used for the execution-order. The names of executable files in systraq.d/ (or symlinks to such files) must consist entirely of upper and lower case letters, digits, underscores, and hyphens. Files which not adhere will be silently ignored. The systraq script supplies some environment variables to the scripts in systraq.d/, these might be helpful when adding your own scripts. Refer to the (very small) systraq code itself for the details. We'll elaborate on some of the shipped systraq.d/ scripts. AA-shellrc checks for unsafe umask setting in shell startup scripts, or unsafe PATH in these scripts. AA-debsums runs debsums, to check md5sums as stated in packaging files with the sums of the actual files running the system. (NB: debsums has support for md5 checksums only, most Debian packages ship md5 checksums only. Therefore, we can't use sha256sum. See also the discussion on proposed release goal: DEBIAN/md5sums for all packages[1] at the Debian release mailinglist in August 2007 as well as Debian Bug #268658[2] for some considerations on this.) AA-localdigest runs sha256sum (or the command set in the ST_SUM environment variable) to check message digests as locally maintained in a file named in the ST_LDIGESTS environment variable. Typically, this is set to /var/lib/systraq/systraq.sums. If this environment variable is unset, this check is silenty skipped. Of course, you can add your own scripts. If you name them AA-local, they'll never get overwritten by any version of this software. If you don't like one of these scripts, you can disable it by removing the symlink, and creating a new symlink with the same name pointing to /bin/true. SEE ALSO
The systraq Manual, installed in /usr/share/doc/systraq. VERSION
$Id: systraq.dbx 374 2008-12-14 08:47:32Z joostvb $ AUTHORS
Joost van Baal <joostvb-systraq-20041015@mdcc.cx> Author. Laurent Fousse <laurent@komite.net> Author. COPYRIGHT
Copyright (C) 2001-2008 Joost van Baal Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. This document is based upon a manual page written by Laurent Fousse for the Debian project. NOTES
1. proposed release goal: DEBIAN/md5sums for all packages http://lists.debian.org/debian-release/2007/08/threads.html#00086 2. Debian Bug #268658 http://bugs.debian.org/268658 [FIXME: source] 17 december 2008 SYSTRAQ(8)
All times are GMT -4. The time now is 12:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy