10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have been searching and trying to come up with an awk that will perform the following on a
converted text file (original is a pdf).
1. Since the first two lines are (begin with) text they are removed
2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
Discussion started by: cmccabe
3 Replies
2. Shell Programming and Scripting
In the awk below, what I am attempting to do is check each line in the tab-delimeted input, which has ~20 lines in it, for a keyword
SVTYPE=Fusion. If the keyword is found I am splitting $3 using the . (dot) and reading the portion before and after the dot in an array a.
If it does have that... (12 Replies)
Discussion started by: cmccabe
12 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
I am trying to understand if its possible to carry out the following.
I have a text file which contains output from multiple commands, within the file a node will be quiered twice if there was 2 commands for example. Is it possible do combine 2 lines into 1 if the first word is the... (1 Reply)
Discussion started by: mutley2202
1 Replies
4. Shell Programming and Scripting
All,
i am new to linux script...
source
Filter: vlan281-BUM-5M
BUM-5M 0 0
Filter: vlan282-BUM-5M
BUM-5M 0 0
Filter: vlan2828-BUM-5M
Filter:... (2 Replies)
Discussion started by: samoptimus
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a file like this:
A 1
B 2
C 3
...
And I want to have just one line like this:
A 1 B 2 C 3 ...
How can I do it?
Thanks! (4 Replies)
Discussion started by: elsagarcia
4 Replies
6. Shell Programming and Scripting
Hello,
I want to combine 2 lines in one
I have a text file
example:
bla123 blo31 xx:yy:zz
->bla43 bli532 00:01:02
bla1237 blo351 aa:ss:dd
->bla433 bli34332 55:10:28
I want the result to be:
bla123 blo31 xx:yy:zz, ->bla43 bli532 00:01:02
bla1237 blo351 aa:ss:dd, ->bla433 bli34332... (3 Replies)
Discussion started by: Petko Meshov
3 Replies
7. Shell Programming and Scripting
Hi,
I have a file like this:
"sdfc@abc.com","arovls","some addr
", "more stuff"
"ssss@email.com","arovls","some addr", "sss"
"edx@email.com","arovls","some addr", "sssdfvv"
"ssss@a55.com","arovls","some addr", "lsdsdgf"
"ssss@0234.com","aro
vls","123
Main", "lSdfv"
I want to... (4 Replies)
Discussion started by: erniel
4 Replies
8. UNIX for Dummies Questions & Answers
I tried to put the history line number and the date into the file with one command, and failed. Can't figure out how to get the date variable substituted for the last space captured.
history | tail -1 | sed -e 's/.\{7\}/&/g' | head -1 | sed 's/ $/$date/'
Result was:
729 $date
So, I... (8 Replies)
Discussion started by: jimbob75
8 Replies
9. UNIX for Dummies Questions & Answers
Hi
I have a file with the records
1 A B C D
2 E F G H
3 I J K L
4 M N O P
In the ouput I want
1 A B C D 2 # F G H
3 I J K L 4 M N O P
How to achieve this? (10 Replies)
Discussion started by: superprg
10 Replies
10. UNIX for Advanced & Expert Users
I have a file called test.txt. Inside this file is the following:
tcenh100.telkom.co.za
100.200.300.400
tcenh101.telkom.co.za
500.600.700.800
I want to take out the new lines and spaces, then I want to put the ip address of the host name next to the host name on the same line, as soon as... (7 Replies)
Discussion started by: wolf
7 Replies
CHECKBASHISMS(1) General Commands Manual CHECKBASHISMS(1)
NAME
checkbashisms - check for bashisms in /bin/sh scripts
SYNOPSIS
checkbashisms script ...
checkbashisms --help|--version
DESCRIPTION
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.
OPTIONS
--help, -h
Show a summary of options.
--newline, -n
Check for "echo -n" usage (non POSIX but required by Debian Policy 10.4.)
--posix, -p
Check for issues which are non POSIX but required to be supported by Debian Policy 10.4 (implies -n).
--force, -f
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).
--extra, -x
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.
--version, -v
Show version and copyright information.
EXIT VALUES
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-
ues:
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.
SEE ALSO
lintian(1).
AUTHOR
checkbashisms was originally written as a shell script by Yann Dirson <dirson@debian.org> and rewritten in Perl with many more features by
Julian Gilbey <jdg@debian.org>.
DEBIAN
Debian Utilities CHECKBASHISMS(1)