hi guys,
i have an array called ARRAY which has elements in it... i am trying to assign elements of ARRAY to master_array..
i get a =: command not found error..
i=0
while
do
${master_array}=${ARRAY}
((i++))
done
is there something i am missing? (4 Replies)
Hi!
Could someone explain me why the below code is printing the contents of IF block 5 times instead of 0?
#!/bin/bash
VAR1="something"
VAR2="something"
for((i=0;i<10;i++))
do
if(($VAR1=~$VAR2))
then
echo VAR1: $VAR1
echo... (3 Replies)
Hey guys,
I'm kinda a noob at scripting. I am trying to create a script that uses multiple for loops with the lsiutility to monitor disk health on a system.
The script runs, but it will continually echo an infinite number of LogVolumes when there are only 2 per virtual disk on my server. It's... (2 Replies)
Hello All,
i have a really strange copy paste problem. When I write some loops in an editor for example:
for j in 1 2 3
do
echo "$j"
done
and I want to paste it to the shell, the result in the shell is:
for j in 1 2 3; do e;
other commands work fine and if a copy paste... (4 Replies)
Hi All,
I've been researching this problem and I am pretty sure that the issue is related to the while loop and the piping. There are plenty of other threads about this issue that recommend removing the pipe and using redirection. However, I haven't been able to get it working using the ssh and... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Your shell script should continue to execute until the user selects option 4
2. Relevant commands, code,... (2 Replies)
Hi,
This is probably going to be very simple but i came across something i can't quite explain. Here is the situation: i have a list of files, which i'd like to process one by one (get the size, make some tests, whatever) and generate some statistics using different variables.
Something... (5 Replies)
hello
i'm writing a script and I want to use a for loop inside a while loop as following:
while read line;
do
echo $line
for i in $vrm;
do
echo $i
done
done < './contacts'
when i use just the while loop it prints the lines from file ./contacts just... (13 Replies)
What is the proper way to run two bash loops in the same command? The two below loops run separately, the problem is when I pipe them I get an error that the file used for the second loop does not exist. I am not sure how to wait for the first loop to complete and then start the second. Thank... (10 Replies)
Hello,
Below I try to control that the input is good an IP :
#!/bin/bash
cp /home/scripts/choice_interfaces.txt /home/scripts/interfaces.txt
chmod 644 /home/scripts/interfaces.txt
echo -e "Please enter the network informations into the /etc/network/interfaces file, complete them below... (9 Replies)
Discussion started by: Arnaudh78
9 Replies
LEARN ABOUT OSX
buildstrings
BuildStrings(1) BSD General Commands Manual BuildStrings(1)NAME
/usr/bin/BuildStrings -- Generate header (.h) or resource (.r) file from text files
SYNOPSIS
/usr/bin/BuildStrings [-define variable] [-header] [-attributes attributeList] [-type filekind] -id ResID -in path -out path
DESCRIPTION
The /usr/bin/BuildStrings command translates a text file into a resource or header file for use in localizing your Carbon application. The
input file is a series of newline-separated pairs of newline-separated strings. Each pair of strings represents the "base" string and the
localized equivalent. When generating a resource file, /usr/bin/BuildStrings generates a STR# resource containing only the localized equiva-
lents (which must be enclosed in double quotes in the source file). When generating the header file, /usr/bin/BuildStrings generates a C
header file with #define directives for each of the base strings (which must be valid C preprocessor symbols) equating each to the ordinal
number of the string in the STR# resource. Your C/C++ source code can use these preprocessor macros, along with standard Resource Manager
calls (like GetIndString) to load the appropriate localized string.
The source file may include #ifdef/#endif (or #ifndef/#endif) directives to conditionally include different pairs of strings, e.g. for debug-
ging builds or different versions. Note that these are the only preprocessor directives allowed in the source file.
When generating a resource file, you can set the resource ID and attributes of the STR# resource by providing /usr/bin/BuildStrings with the
appropriate command-line options.
You can use /usr/bin/BuildStrings with several different sets of strings in the same application, for example, error strings and warning
strings. The -type argument customizes some #defines in the generated header file so there are no conflicts.
The /usr/bin/BuildStrings command accepts the following arguments:
-header Generate a header file. If not provided, default is resource file format. Note that the file extension is not provided automati-
cally; your output file name must have the appropriate .h or .r extension.
-define variable
Defines variable for use in #ifdef or #ifndef conditionals. No value may be assigned to variable. This argument may be repeated
for any number of variables.
-id ResID
The resource ID for the STR# resource. There is no support for setting the resource name.
-attributes attribute
Resource attributes for the STR# resource definition (such as locked, preload, etc.) These are provided after the resource name in
the resource definition. This argument may be repeated for any number of attributes. It is ignored if generating a header.
-type filekind
Customizes three preprocessor variables (MinValidFoo, MaxValidFoo, FooRsrcID) #defined in a generated header file. Note that if
this argument is not provided, the default is the literal string "(null)", which will cause compile errors in the header file.
-in path
The input file, a set of newline-separated pairs of newline-separated strings. The first string of the pair is ignored for the
resource file (but is provided in a comment) and is used as the preprocessor symbol in the header file. The second string of the
pair is used as the resource string in the resource file and is ignored in the header file (but is provided in a comment), and must
be enclosed in double-quotes in your source file.
-out path
The output file. Note that you should provide the appropriate file extension; it is not provided automatically according to the
-header flag.
SEE ALSO Rez(1), DeRez(1)Mac OS X April 12, 2004 Mac OS X