10 More Discussions You Might Find Interesting
I have spent considerable amount of time breaking my head on this and reached out here. here is the back ground.
OS - Solaris 10
There are two strings '<Orin>sop' and '<Dup>two' which I wanted to look for in a file without the quotes on different lines and ONLY if both strings are... (5 Replies)
Discussion started by: keithTait309875
2. Shell Programming and Scripting
I have a txt file and I would like to use egrep without using -v option to exclude the lines which matches with multiple Strings.
Let's say I have some text in the txt file. The command should not fetch lines if they have strings something like
CAT MAT DAT
The command should fetch me... (4 Replies)
Discussion started by: Sathwik
3. Shell Programming and Scripting
I can extract lines in a file, between two strings but only one time.
If there are multiple occurencies, my command show only one block.
Example, monfichier.txt contains :
donnees inutiles 1
donnees inutiles 2
... (8 Replies)
Discussion started by: theclem35
4. Shell Programming and Scripting
I am trying to get lines between the last occurrences of two patterns. I have files that have several occurrences of “Standard” and “Visual”. I will like to get the lines between “Standard” and “Visual” but I only want to retain only the last one e.g.
Some... (4 Replies)
Discussion started by: damanidada
5. Shell Programming and Scripting
I have been struggling to fix an issue in csv records to compose sql statements and have been really losing sleep over it. Here is the problem:
I have csv files in the following pipe-delimited format:
Address Type|some descriptive... (4 Replies)
Discussion started by: khayal
6. UNIX for Dummies Questions & Answers
I want to write a script that does something like this:
I have a file, in which in every line, there is a string of words, and followed by some space, a number.
Now, I want to identify the line, which has the largest startFace number (say m=8118), take that number and add it to the... (2 Replies)
Discussion started by: super_commando
7. Shell Programming and Scripting
Please go through my requirement.
I have a log file in the location /opt/WebSphere61/AppServer/profiles/EMQbatchprofile/logs/EMQbatch
This file contains the follwing pattern data
<af type="tenured" id="42" timestamp="May 14 13:44:13 2011" intervalms="955.624">
<minimum... (8 Replies)
Discussion started by: satish.vampire
8. Shell Programming and Scripting
ive been trying to replace a string "kw01" in an xml file with the contents of a txt file having multiple lines. im a unix newbie and all the sed combinations i tried resulted to being garbled. Below is the contents of the txt file:
--------------------... (13 Replies)
Discussion started by: 4dirk1
9. Shell Programming and Scripting
Desired csv output
gc_type, date/time, milli secs
af, Mar 17 13:09:04 2011, 144.596
af, Mar 20 00:37:37 2011, 144.242
af, ar 20 21:30:59 2011, 108.518
Any help in acheiving the above would be appreciated. I would like to parse through lines within one file and... (5 Replies)
Discussion started by: satish.vampire
10. UNIX for Dummies Questions & Answers
I want to search files (basically .cc files) in /xx folder and subfolders.
Those files (*.cc files) must contain #include "header.h" AND x() function.
I am writing it another way to make it clear,
I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings, header.h... (2 Replies)
Discussion started by: ritikaSharma
CHECKBASHISMS(1) General Commands Manual CHECKBASHISMS(1)
checkbashisms - check for bashisms in /bin/sh scripts
checkbashisms script ...
checkbashisms, based on one of the checks from the lintian system, performs basic checks on /bin/sh shell scripts for the possible presence
of bashisms. It takes the names of the shell scripts on the command line, and outputs warnings if possible bashisms are detected.
Note that the definition of a bashism in this context roughly equates to "a shell feature that is not required to be supported by POSIX";
this means that some issues flagged may be permitted under optional sections of POSIX, such as XSI or User Portability.
In cases where POSIX and Debian Policy disagree, checkbashisms by default allows extensions permitted by Policy but may also provide
options for stricter checking.
Show a summary of options.
Check for "echo -n" usage (non POSIX but required by Debian Policy 10.4.)
Check for issues which are non POSIX but required to be supported by Debian Policy 10.4 (implies -n).
Force each script to be checked, even if it would normally not be (for instance, it has a bash or non POSIX shell shebang or appears
to be a shell wrapper).
Highlight lines which, whilst they do not contain bashisms, may be useful in determining whether a particular issue is a false posi-
tive which may be ignored. For example, the use of "$BASH_ENV" may be preceded by checking whether "$BASH" is set.
Show version and copyright information.
The exit value will be 0 if no possible bashisms or other problems were detected. Otherwise it will be the sum of the following error val-
1 A possible bashism was detected.
2 A file was skipped for some reason, for example, because it was unreadable or not found. The warning message will give details.
checkbashisms was originally written as a shell script by Yann Dirson <email@example.com> and rewritten in Perl with many more features by
Julian Gilbey <firstname.lastname@example.org>.
Debian Utilities CHECKBASHISMS(1)