Sponsored Content
Full Discussion: Bash set dummy ?
Top Forums Shell Programming and Scripting Bash set dummy ? Post 303033070 by RudiC on Friday 29th of March 2019 11:33:29 AM
Old 03-29-2019
Written as is, the first command will set the positional parameters to the string constant "dummy" and the value of $ac_prog. Check it with e.g. echo $@. Then, ac_word will be assigned the second pos. parameter's value, i.e. the value found in $ac_prog.


Yes, commands in bash can be written each on its own line.


The last command will set the second pos.param. to a string concatenated from ${ac_tool_prefix}'s value and the string constant "strip".
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Hardware dummy trying to set up Unix workstation for Oracle at home for practice!

I have been planning to set up a Unix workstation at home to host an Oracle database just for database admin. practice. But I don't know enough about hardware to know whether this can be done on a regular desktop and the required hardware config. If anyone could kindly guide me in this mission I... (4 Replies)
Discussion started by: tmanpakdee
4 Replies

2. UNIX for Advanced & Expert Users

How to set up dummy printer on UNIX

Hi, I work at IT department of a home furnishing company in Canada. Presently we are working on printer issue on UNIX system and we like to set up a dummy printer on the system. We are not much sure about the procedure to try it and it woul dbe great if we get some advice to go ahead. Thanks... (3 Replies)
Discussion started by: srabanti
3 Replies

3. Shell Programming and Scripting

[bash] Check if variable is set or blank

Hello guys. In my script, i have the following code: echo "The tarfile contains these directorys" tar -tf file.tar > tarlist.txt cat tarlist | awk -F/ '{print $1 "/" $2}' | nl echo "Enter path of the directory you want to extract or just press enter to extract everything: " read path... (1 Reply)
Discussion started by: noratx
1 Replies

4. Shell Programming and Scripting

test-and-set in bash

I'm not talking about the assembly instruction TAS, a better name could be check-and-set :) Anyway, is there a way to simplify the following if ; then VAR="something"; fi I have ~20 variables that should be test-and-set like this, and it really looks lame. (2 Replies)
Discussion started by: rayne
2 Replies

5. Shell Programming and Scripting

Help with Bash script - set, awk

Trying to search a log file for a string, starting from a certain point in the log file. I want to return the number of lines that contain the search string and the total number of lines in the log file. Here's the part of the script I'm having problems with: set -- $(awk -v... (12 Replies)
Discussion started by: mglenney
12 Replies

6. Solaris

How do i permanently set bash profile??

Hi all, I don't want to enter below command on solaris every time. How do i permanently set this command on Solaris. I know that this operation is a piece of cake on redhat because there is a /etc/rc.local file on it. But Solaris ???? bash-3.00#export PS1="\e (2 Replies)
Discussion started by: getrue
2 Replies

7. UNIX for Dummies Questions & Answers

Is there a way to set ' and " as a non quotes type in bash?

Howdy, I got a script that adds a esc char before all chars interpeted by bash shell but I wan't other solution. Is there a way to set ' and " as a non quotes type in bash (some local variable)? Have found that scsh is a non-quoting type shell but after reading Why I don't use scsh as a scripting... (3 Replies)
Discussion started by: johny_be_good
3 Replies

8. Shell Programming and Scripting

How to trap set -o nounset in bash

I have a bash script using "set -o nounset" to prevent unset variables. However I have created a trap to run some cleanup options upon exit of the script which works fine for CTRL-C, etc. but if it hits and unset variable the trap does not run and the script bails out without having tidied up... (3 Replies)
Discussion started by: jelloir
3 Replies

9. Shell Programming and Scripting

Bash script set command to a variable

Hi, Will following set up work in bash script? I've got errors if assigning following binary command to a variable. But on the other hand, COMMAND="ls" works. Any explanation please? How can I assign binary command to a variable COMMAND then I can just call ${COMMAND}? COMMAND="rsync"... (3 Replies)
Discussion started by: hce
3 Replies

10. Shell Programming and Scripting

How do i check if all parameters are set in bash?

Hi, I have 4 parameters passed to my shell and i validate if all four are entered using the following snippet: if then echo "Not entered" else echo "entered" fi I get the following output as 'Not entered even when i enter the values for all prompts. Please advise. Thanks. (5 Replies)
Discussion started by: Jesshelle David
5 Replies
mkstr(1)						      General Commands Manual							  mkstr(1)

NAME
mkstr - extract error messages from C source into a file SYNOPSIS
messagefile prefix file... DESCRIPTION
examines a C program and creates a file containing error message strings used by the program. Programs with many error diagnostics can be made much smaller by referring to places in the file, and reduce system overhead in running the program. processes each of the specified files, placing a revised version of each in a file whose name consists of the specified prefix concatenated in front of the original name. A typical usage of would be This command would cause all the error messages from the C source files in the current directory to be placed in the file and revised copies of the source for these files to be placed in files whose names are prefixed with When processing the error messages in the source for transfer to the message file, searches for the string in the input file. Each time it is encountered, the C string starting after the leading quote is placed in the message file, followed by a null character and a newline character. The null character terminates the message so that it can be easily used when retrieved, and the newline character makes it pos- sible to conveniently list the error message file (using etc.; see cat(1) and more(1)) to review its contents. The modified copy of the input file is identical to the original, except that each occurrence of any string that was moved to the error message file is replaced by an offset pointer usable by to retrieve the message. If the command line includes the optional extracted error messages are placed at the end of the specified message file (append) instead of overwriting it. This enables you to process individual files that are part of larger programs that have been previously processed by with- out reprocessing all the files. All functions used by the original program whose names end in that also can take a constant string as their first argument should be rewritten so that they search for the string in the error message file. For example, a program based on the previous example usage would resemble the following: EXTERNAL INFLUENCES
Environment Variables determines the interpretation of comments and string literals as single- and/or multibyte characters. If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari- able. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See environ(5). International Code Set Support Single- and multibyte character code sets are supported within file names, comments, and string literals. WARNINGS
Strings in calls to functions whose names end in notably may be replaced with offsets by Calls to error functions whose first argument is not a string constant are left unmodified without warning. SEE ALSO
xstr(1), lseek(2), perror(3C). mkstr(1)
All times are GMT -4. The time now is 09:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy