08-22-2016
Merely posting that there are errors is not helping much.
- What errors do you get on running this script?
- What did you understand from the errors?
Last edited by rbatte1; 08-25-2016 at 08:44 AM..
Reason: Converted to formatted number-list
This User Gave Thanks to balajesuri For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys, I hope you can help me with my problem.
I have a text file that contains lines like this:
78 ANGELO -809.05
79 ANGELO2 -5,000.06
I need to find all occurences of amounts that are negative and replace them with x's
78 ANGELO xxxxxxx
79... (4 Replies)
Discussion started by: amangeles
4 Replies
2. Shell Programming and Scripting
Hello All,
Plz help me with:
I have a csv file with data separated by ',' and optionally enclosed by "". I want to check each of these values to see if they exceed the specified string length, and if they do I want to cut just that value to the max length allowed and keep the csv format as it... (9 Replies)
Discussion started by: ozzy80
9 Replies
3. Shell Programming and Scripting
how can i campare te length of the string
$var = unix
if ( $var -eq 4 )
then..
is it right (6 Replies)
Discussion started by: mail2sant
6 Replies
4. Shell Programming and Scripting
I need to compare two files with exactly same length as example: -
File1 contain 500 records with length of 640 chars of each line.
File2 contain 1500 records with length of 640 chars of each line.
I need get an output to be written in File3 which will contain 1000 records difference.
but... (4 Replies)
Discussion started by: elj3dah
4 Replies
5. UNIX for Dummies Questions & Answers
HI
In my script, i am reading the input from the user and want to find the length of the string.
The input may contain leading spaces. Right now, when leading spaces are there, they are not counted.
Kindly help me
My script is like below. I am using the ksh.
#!/usr/bin/ksh
echo... (2 Replies)
Discussion started by: dayamatrix
2 Replies
6. Shell Programming and Scripting
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies
7. UNIX for Dummies Questions & Answers
I have two very large datasets (>100MB) in a simple vertical list format. They are of different size and with different order and formatting (e.g. whitespace and some other minor cruft that would thwart easy regex).
Let's call them set1 and set2.
I want to check set2 to see if it contains... (2 Replies)
Discussion started by: uiop44
2 Replies
8. Shell Programming and Scripting
Hi,
I have a program written in awk and I want to extend it to do another task.
My program is a list of CVS log reports of a repository. For each file, I have some fields. One of the fields is the comment field. I want to know how I can check if a comment (which is a free text field)... (8 Replies)
Discussion started by: sandeepk1611
8 Replies
9. Shell Programming and Scripting
Hi All,
I have a file test.txt.
Content of test.txt :
1 vinay se
2 kumar sse
4 kishore tl
I am extracting the content of file with below command.
awk '$2 ~ "vinay" {print $0}' test.txt
Now instead of hardcoding $2 is there any way pass $2 as variable and compare with a... (7 Replies)
Discussion started by: Girish19
7 Replies
10. UNIX for Beginners Questions & Answers
I have below code inside my awk script
if ( $0 ~ /SVC IN:/ )
{
svc_in=substr( $0,23 , 3);
if (msg_start == 1 && msg_end == 0)
{
msg_arr=$0;
}
}
else if ( $0 ~ /^SVC OUT:/ )
{
svc_out=substr( $0, 9, 3);
if (msg_start == 1 && msg_end == 0)
... (6 Replies)
Discussion started by: bhagya123
6 Replies
LEARN ABOUT DEBIAN
rescan-scsi-bus
RESCAN-SCSI-BUS.SH(8) System Manager's Manual RESCAN-SCSI-BUS.SH(8)
NAME
rescan-scsi-bus.sh - rescan the SCSI bus.
SYNOPSIS
rescan-scsi-bus.sh [ -l ] [ -w ] [ -c ] [ -r ] [ host... ]
DESCRIPTION
rescan-scsi-bus.sh is a program that is used to rescan the SCSI bus using the SCSI add-single-device feature of the Linux SCSI layer.
OPTIONS
-l Activates scanning for LUNs 0 .. 7 (default: 0).
-L NUM Activates scanning for LUNs 0 .. LUN (default: 0).
--luns=LIST
Scan only LUNs in LIST.
-w Enables scanning for device IDs 0 .. 15 (default: 0 .. 7).
--ids=LIST
Scan only device IDs in LIST.
-i, --issue-lip
Issue a FibreChannel LIP reset (default: disabled).
-r, --remove
Enables removing of devices (default: disabled).
--forceremove
Remove and readd every device (dangerous).
-c Enables scanning of channels 0 1 (default: 0).
--channels=LIST
Scan only channels in LIST.
host, --hosts=LIST
If host adapters are given, only these are scanned (default: all).
--nooptscan
Don't stop looking for LUNs if 0 is not found.
--color
Use coloured prefixes OLD/NEW/DEL.
LIST is a comma separated list of single values and ranges (no spaces allowed), e.g. 0,2-3,8,10-15.
AUTHOR
rescan-scsi-bus.sh was written by Kurt Garloff <garloff@suse.de>.
COPYRIGHT
This program is free software. You can use it under the terms of the GNU GPL (General Public License) Version 2 (or any later version, at
your option). Note, that the GNU GPL implies, that there is NO WARRANTY at all. Full text of the GPL can be found in /usr/share/common-
licenses/GPL file.
AVAILABILITY
rescan-scsi-bus.sh is available from
http://www.garloff.de/kurt/linux/scsidev/
March 1998 RESCAN-SCSI-BUS.SH(8)