but if you just want to see if something with *usb* exists, why run fdisk? the shell globs the path, so you can just check if it expands to existing files. which shell?
Hi All,
My input file name is 1.sh
the contents of file are
cat status2.txt | while read filename
do
echo "$filename"
echo "first content of the file is ${filename}"
echo "second content of the file is ${filename}"
echo "second content of the file is ${filename}"
if } -eq 0 -a... (1 Reply)
Hi..
Im using the following script to find whether the present day is monday or not. If it is monday it has to do a specific set of things.
#!/bin/sh
Present_Date=`date`
LOAD_DAY=`date -d "$Present_Date" | cut -d " " -f 1`
echo $LOAD_DAY
if ;then
echo "Monday"
#statements;... (6 Replies)
Hi All,
I have a script which is based on calculating current time
The script looks like this:
whenever i try to run the script it gives me error:Please advice wherther i have made mistake with if condition or with for loop??
The code :
set -x
#!/usr/bin/ksh
set -x... (7 Replies)
Hello all! I need help in debugging following script. I have no idea where I am going wrong.
#!/bin/bash
for p1 in A1 TM MP
do
for p2 in A1 TM MP
do
for mp1 in N1 N2
do
for mp2 in N1 N2
do
for mp3 in N1 N2
do
for mp4 in N1 N2
do
for... (7 Replies)
Hi Guys,
Can you please help me to check if my condition is correct.
if &&
then
if ; then
# active
SE_USERID_LUZON_5="A"
elif ; then
# not active
SE_USERID_LUZON_5="D"
${ECHO_CMD}... (3 Replies)
Hi All,
I need to compare the header of the input files which can be comma demilited, tild(~) or Pipr(|) seperated file.
I am comparing the file header by taking 1st row and comparing it with input row:
Below is the actual code:(ksh script)
if
then
echo $dat >>... (4 Replies)
please follow below code
if ; then
its giving me an error as "test1.sh: line 3: r=$(eval echo '$lck_'$TABLE != "")
if
can anyone tell me how to do inside if condition...with out use any variable..
TIA (6 Replies)
Testing this with KSH on RHEL
The bellow code works but i can't seem to handle the exit status of the unix command when it fails... i wanted to put something like >/dev/null 2>&1 to manage standard output and standard error but it changes my logic and the code doesn't work cause it doesn't... (11 Replies)
Hi,
I have an if condition on executing it is giving syntax error as below:
--------------------------------------------------------------------------------------
line 61: syntax error in conditional expression
./play_test.sh: line 61: syntax error near `]'
./play_test.sh: line 61: ` if... (2 Replies)
Hi Team,
If condition is not working properly and getting below error
# ./score1.sh
Enter your score ('q' for quit): 102
Enter your score ('q' for quit): q
./score1.sh: line 9: q: integer expression expected
Average is: 102%.
Exit.
Actual code
# Calculate the average of given... (3 Replies)
Discussion started by: Torrid
3 Replies
LEARN ABOUT DEBIAN
usb-devices
usb-devices(1) Linux USB Utilities usb-devices(1)NAME
usb-devices - print USB device details
SYNOPSIS
usb-devices
DESCRIPTION
usb-devices is a (bash) shell script that can be used to display details of USB buses in the system and the devices connected to them.
The output of the script is similar to the usb/devices file available either under /proc/bus (if usbfs is mounted), or under /sys/ker-
nel/debug (if debugfs is mounted there). The script is primarily intended to be used if the file is not available.
In contrast to the usb/devices file, this script only lists active interfaces (those marked with a "*" in the usb/devices file) and their
endpoints.
Be advised that there can be differences in the way information is sorted, as well as in the format of the output.
RETURN VALUE
If sysfs is not mounted, a non-zero exit code is returned.
FILES
/sys/bus/usb/devices/usb*
The part of the sysfs tree the script walks through to assemble the printed information.
/proc/bus/usb/devices
Location where the usb/devices file can normally be found for Linux kernels before 2.6.31, if usbfs is mounted.
/sys/kernel/debug/usb/devices
Location where the usb/devices file can normally be found for Linux kernel 2.6.31 and later, if debugfs is mounted.
SEE ALSO lsusb(8), usbview(8).
AUTHORS
Greg Kroah-Hartman <greg@kroah.com>
Randy Dunlap <rdunlap@xenotime.net>
Frans Pop <elendil@planet.nl>
usbutils-005 23 June 2009 usb-devices(1)