Hi,
For my bash script, terminal with bash is generate an OK output and program works right.
already,
terminal with ash have "line 48: syntax error: Bad substitution" output and program don't work.
:confused: (0 Replies)
Guys
I now have a script that's working in a BASH environment, however one line doesn't appear to be working on an embedded device that has a busybox therefore ASH shell. I've googled but there's very little I can find regarding the ASH shell.
In BASH the following line works...
if ] ;... (6 Replies)
Hi, I'm a beginner at shell scripting, just started scripting in bash a few days ago.
I want to test if the command ls *.jpg returns exit code 2, and if yes I want to execute a new command ls *.jpeg, doing a test on it... and pretty much repeat the procedure.
Is this correct?
#!/bin/bash... (1 Reply)
I have a script that has to execute a read command in a function, this is in an ash busybox.
The code is...
trapcatch () { echo "Ctl-c Detected, what do you want to do?"
echo "Please choose the number of one of the following options"
echo "1. Jump past this Set"
echo "2. Exit... (8 Replies)
I wrote Bash script and now I want to convert it to Ash. One headache is this function:
do_adduser() {
setaddprompt
_arr_add=("Add manually" "Add via TXT" "return to main menu" "exit program")
select add_action in "${_arr_add}"
do
case "$REPLY" in
1)... (7 Replies)
I'm trying to convert this working bash script into an Ash script,
read -p "Username:" _username
if ! ]]; then
echo "Valid"
else
echo "INVALID"
fi
However, Ash does not recognize the "=~" character.
How can I do this?
Also, is there a good reference guide, so I... (5 Replies)
hello everybody,
i'm a beginner in ash and i want to convert this bash script to ash.
this script send a xml file to a nagios server :
#!/bin/bash
PROGNAME=$(basename $0)
RELEASE="Revision 0.3"
print_release() {
echo "$RELEASE"
}
print_usage() {
echo ""
echo "$PROGNAME... (6 Replies)
Hi everyone,
i have the following script.sh:
foo='lsusb | grep Webcam | cut -c16-18'
sudo /home/user/public/usbreset /dev/bus/usb/001/$foo
when i try to call this script from python using subprocess.call("script.sh", shell=True) it seems that only 'sudo /home/user/public/usbreset' is being... (6 Replies)
Hi everyone, first time visitor to these forums here.
Keeping a long story short I've been attempting to learn how to code in bash. I have VERY little previous experience with coding languages besides simply copying and pasting batch scripts for Windows. So, with that in mind I've followed a... (4 Replies)
Hello so I've stored some csv data to be read into variables like this
Name,Team,Shop,Shoe
etc,etc,etc,etc
Code:
sep=","
{
while IFS=$sep read Name Team Shop Shoe
do
count=1
dirname=$Name
while
do
((count++))
dirname="${Name}$count" (4 Replies)
Discussion started by: darklord173
4 Replies
LEARN ABOUT OSF1
programmers_workbench_library
libpw(3) Library Functions Manual libpw(3)NAME
libpw, libPW, Programmers_Workbench_Library - Provides functions for compatibility with existing programs
LIBRARY
Programmers Workbench Library (libPW.a)
DESCRIPTION
The libpw functions are provided for compatibility with existing programs. Their use in new programs is not recommended. Determines
whether string contains character. Determines the offset in string1 of the first character that also occurs in string2. Determines the
offset in string of the first character in the string end that occurs outside of a balanced string as defined by open and close. Concate-
nates the source strings and copies them to destination. Defaults the cleanup routine. Puts the full pathname of the current directory in
string. Determines which directory contains the file p. General purpose error handler. Same as the stdio fdopen() function. Forces a
core dump. Determines if the string pref is an initial substring of string. Determines the offset of the first occurrence in string1 of
string2. Creates a lock file. Returns caller's login name. Copies the first n characters of string1 to string2. Converts string to
integer. Converts string to long. Sets destination to string repeated n times.
Replaces each occurrence of the character old in string with the character new.
Converts string to integer and saves it in *ip. Causes signals to be caught by the setsig1() function.
General purpose signal handling routine.
Gets a pointer to the simple name of full pathname s.
Finds the end of string. Places a substring of string s in destination using the offset origin and length. Copies string s into destina-
tion and replaces any character in old with the corresponding characters in new. Deletes the lock file. Gets the user's login directory.
Defaults user exit routine. Gets the user's login name. Determines the offset in string1 of the first character that is not also in
string2. Allocates memory. Creates a file. Frees memory.
Frees all memory.
Links files. Calls the fatal() function with an appropriate error message. Opens a file. Creates a pipe. Removes a directory entry.
Writes n bytes to the file associated with fd from buffer. Zeros n bytes starting at address p. Replaces the initial blanks with the
character '0' in string s. delim off
libpw(3)