Sponsored Content
Full Discussion: Regarding syntax
Top Forums Shell Programming and Scripting Regarding syntax Post 302210097 by Franklin52 on Monday 30th of June 2008 04:57:08 AM
Old 06-30-2008
It gives the length of the variable $var, have a read of a scripting tutorial:

https://www.unix.com/answers-frequent...tutorials.html

Regards
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

What does this syntax mean...

OK, the title is a little vague, but basically i was gonig through some files and ran into some strange syntax... heres what it looks like: ... 1&>~/<file extension> where ... is a chain of commands (the 1&>~ is part of the arguments) and the file extension is just a pointer to a file... (1 Reply)
Discussion started by: DrAwesomePhD
1 Replies

2. Shell Programming and Scripting

Help with the syntax

export check=$(expandname $(dirname $(which $0))) (2 Replies)
Discussion started by: chandhar
2 Replies

3. Shell Programming and Scripting

Help with the syntax

can anyone explain the code for me... i am new to shell programming while getopts ":S:D:U:" OPTION "$@" do case $OPTION in S) SRVR=$OPTARG;; D) DB="$OPTARG"; USEDB="use $OPTARG";; U) UID=$OPTARG;; :) MISSINGOPTARG="$MISSINGOPTARG -$OPTARG";; ?) if then ... (2 Replies)
Discussion started by: chandhar
2 Replies

4. UNIX for Dummies Questions & Answers

csh syntax

I am trying to list output in columns in csh. What would be the syntax for this shell if in ksh it is: ls -d !(*SNMP*) ? (0 Replies)
Discussion started by: charlie11k
0 Replies

5. Shell Programming and Scripting

what is the right syntax ??

IN the book below example showed find /home/tolstoy -type d -print | Find all directories sed 's;/home/tolstoy/;/home/lt/;' | Change name, note use of semicolon delimiter while read newdir Read new directory name do mkdir $newdir ... (7 Replies)
Discussion started by: convenientstore
7 Replies

6. Shell Programming and Scripting

What syntax to use with sed c\

I know that I want to entirely replace line 3 in my file filename.txt. I have tried all sorts of variations of sed 3,3,c\replacement stuff\ filename.txt with no success. about the only thing that causes any reaction is sed 3,3c\\ filename.txt but it just prints out the whole file. ... (13 Replies)
Discussion started by: SusanDAC
13 Replies

7. UNIX for Dummies Questions & Answers

Syntax Help

Hi everyone, I got some code here that I've been working on, but I've gotten stuck. I cant figure out what is wrong with the syntax. sub cksum{ my $uint32_t = \buffer; my $word_count; my $bias; ( #uint32_t checksum = $bias $word_count = $bias while ($word_count>=0) ... (2 Replies)
Discussion started by: TeamUSA
2 Replies

8. Shell Programming and Scripting

for ... do - syntax

hi! pls help me :) cd folder for f in *; do ... done this circle takes all files from folder1 i need only .pdf files but it may be like a.pdf or a.PDF what syntax must i use? smth like it: cd folder for f in *.(pdf|PDF); do (2 Replies)
Discussion started by: optik77
2 Replies

9. Shell Programming and Scripting

GnuPG Syntax Help

Hi all, I'm trying to decrypt a GnuPG file but not having much luck. I'm new to using it and have tried 4 different ways to do it but nothing works. Here are examples of the attempts I have made: gpg -o ./file_name.tar.Z --passphrase-fd 0 ./file_name.tar.Z.gpg 0<./password.txt cat... (5 Replies)
Discussion started by: Korn0474
5 Replies

10. UNIX for Dummies Questions & Answers

Perl syntax

Query with perl syntax Aim: is to change a perl script to use a new file I was required to replace - entries \"$entries\" with -lib <full_path_to_filename> So in the code detector.pm sub rundetector { my $class = shift; mkdir($resultDirectory); my... (3 Replies)
Discussion started by: sa@@
3 Replies
rc.config(4)						     Kernel Interfaces Manual						      rc.config(4)

NAME
rc.config, rc.config.d - files containing system configuration information SYNOPSIS
DESCRIPTION
The system configuration used at startup is contained in files within the directory The file sources all of the files within and and exports their contents to the environment. /etc/rc.config The file is a script that sources all of the scripts, and also sources To read the configuration definitions, only this file need be sourced. This file is sourced by whenever it is run, such as when the command is run to transition between run states. Each file that exists in is sourced, without regard to which startup scripts are to be executed. /etc/rc.config.d The configuration information is structured as a directory of files, rather than as a single file containing the same information. This allows developers to create and manage their own configuration files here, without the complications of shared ownership and access of a common file. /etc/rc.config.d/* Files This is where files containing configuration variable assignments are located. Configuration scripts must be written to be read by the POSIX shell, and not the Bourne shell, or In some cases, these files must also be read and possibly modified by control scripts or the sam program. See sd(4) and sam(1M). For this reason, each variable definition must appear on a separate line, with the syntax: No trailing comments may appear on a variable definition line. Comment statements must be on separate lines, with the comment character in column one. This example shows the required syntax for configuration files: Configuration variables may be declared as array parameters when describing multiple instances of the variable configuration. For example, a system may contain two network interfaces, each having a unique IP address and subnet mask (see ifconfig(1M)). An example of such a dec- laration is as follows: Note that there must be no requirements on the order of the files sourced. This means configuration files must not refer to variables defined in other configuration files, since there is no guarantee that the variable being referenced is currently defined. There is no protection against environment variable namespace collision in these configuration files. Programmers must take care to avoid such prob- lems. /etc/TIMEZONE The file contains the definition of the environment variable. This file is required by POSIX. It is sourced by at the same time the files are sourced. SEE ALSO
rc(1M). rc.config(4)
All times are GMT -4. The time now is 10:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy