10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Gurus,
I have requirement to compare current result with previous reuslt.
The sample case is below.
1 job1 1
1 job2 2
1 job3 3
2 job_a1 1
2 job_a2 2
2 job_a3 3
3 job_b1 1
3 job_b2 2
for above sample file, GID is group ID, for input line, the job run... (1 Reply)
Discussion started by: ken6503
1 Replies
2. Shell Programming and Scripting
Hi all,
I have a quick question:
I have a 4 column tab-separated file.
I want to count the number of times each unique value in column 2 appears and add that number in a 5th column.
I have the following input file:
waterline-n below-sheath-v 14.8097 A
dock-n below-sheath-v ... (4 Replies)
Discussion started by: owwow14
4 Replies
3. Shell Programming and Scripting
Hi, I am new to shellscripting, I have two files as below
File1:
Abcdefg110111xyza000000600000000024.020000060000000000024.020000004660000000003.41000000000010000000100.000000000123
File 2:... (3 Replies)
Discussion started by: rajendrabujji
3 Replies
4. Shell Programming and Scripting
Hi,
I am using split in AIX to split a large file into parts, but in AIX, it names the resulting files something like newaaaa, newaaab, newaaac etc (using a-z for each)
I need to rename these new0001, new0002, new0003 etc.
Is there an easy way to do this?
Cheers, Rob (4 Replies)
Discussion started by: say170
4 Replies
5. Shell Programming and Scripting
Hello,
How to add numbers that are read from a file /tmp/test
The content of the file look like
1234
234
432
1235
123
I read the file content in a for loop
f=/tmp/test
for i in `cat $f`
do
.
.
done
Santhosh (11 Replies)
Discussion started by: mvsanthosh
11 Replies
6. Shell Programming and Scripting
echo "0.1 2.0 0.4 2.0 4.3 1.0 6.0 9.0" | awk 'BEGIN {total=0} {total += $1} END {print total}'
I want to add the above output from the echo command, but i can't figure this out. The output above always spits out inaccurate numbers.
can someone please provide me with a one liner similar to... (4 Replies)
Discussion started by: SkySmart
4 Replies
7. UNIX for Dummies Questions & Answers
hi,
i am having one file which looks like the one below:
ABC1
***
1
4
ABC2
***
7
12
ABC3
***
0
34
... (4 Replies)
Discussion started by: kripssmart
4 Replies
8. Shell Programming and Scripting
Hello.
I new to Shell Scripting.
I have a file and here is the output of the file.
1.1M
1.1M
3.3M
149K
61K
75K
144K
135K
82K
170K
327K
2.0M
219K
165K (8 Replies)
Discussion started by: email-lalit
8 Replies
9. Shell Programming and Scripting
:confused:
I have plain text file "tmp" which include a range of numbers(bytes), say like:
123
234
567
2434
2323
213123
How can I add them and display out.
should I use AWK, then how?
I am a newer in Bourne shell, please give me a hand, thanks a lot (7 Replies)
Discussion started by: pnxi
7 Replies
10. Shell Programming and Scripting
im using this command to return the number of links in my directory,
grep -c -i -h "href" *html */*html *htm *shtml
is there a way of adding these to get the total?
Cheers (3 Replies)
Discussion started by: TalkShowHost
3 Replies
BCHARGE(1) General Commands Manual BCHARGE(1)
NAME
bcharge - program to set BlackBerry handhelds to 500mA
SYNOPSIS
bcharge
DESCRIPTION
bcharge is a program that sends a special handshake to all BlackBerry devices it finds on the USB bus. This handshake causes the device to
reset itself, and then request 500mA instead of the usual 100mA. This allows proper charging on Linux.
It is safe to run this command multiple times, as it only changes devices that are not already set to 500mA, or are not in the desired
mode.
OPTIONS
-o For Blackberry Pearl devices, using this switch causes bcharge to set the Product ID to 0001.
When the Pearl is in 0004 mode, two USB interfaces are presented: one for database access and one for mass storage. In 0001 mode,
only the database access is available.
Before bcharge is run, the Pearl shows up with a Product ID of 0006, which only gives mass storage functionality. You must run
bcharge for the Pearl before using btool.
-d This switch is for the Blackberry Pearl to switch it back to 0004 dual mode after having run bcharge with the -o option. Alter-
nately, newer devices (such as Storm with product ID of 8007) will be switched to 0004. Since a Pearl in mode 0001 is practically
indistinguishable from a classic Blackberry, the -d switch is needed to tell bcharge that you really are working with a Pearl.
-g Guess whether Dual mode is needed. If USB Interface Class 255 is not found on the device (the class used for database access), then
dual mode is set. Otherwise, the device is left as is.
-h Help summary.
-p devpath
If your system runs a kernel with CONFIG_USB_SUSPEND enabled (some Ubuntu kernels have this turned on, as well as some Fedora 7 ker-
nels), then you also need to adjust the suspend state to avoid going into power saving mode. This option is used when run from
udev, using a rule such as:
BUS=="usb", SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0001", SYMLINK+="bb-%k",
GROUP="plugdev", MODE="0660", RUN="/usr/sbin/bcharge -p %p"
When using this option, you will almost always need to be root.
-s path
Specify the mount point for the sysfs filesystem. On most systems this is mounted at /sys which is the default.
AUTHOR
bcharge and this manual page were written by Chris Frey <cdfrey@foursquare.net> for the Barry project.
http://www.netdirect.ca/software/packages/barry
October 7, 2010 BCHARGE(1)