Sponsored Content
Top Forums Shell Programming and Scripting Substr throws an ERROR. Any alternatives? Post 302193080 by naseert on Thursday 8th of May 2008 12:27:34 PM
Old 05-08-2008
Thank you..

Thanks Hemangjan.. !!! Thanks a lot.. It worked.. Yay...!!!
Smilie


One more question,

if [ $a = $b ]
then
echo SUCCESS
fi

If I want to case-insensitive-compare these two variables, what should I use?/

Sorry to ask these dumb questions. I'm a newbie to SHELL SCRIPTING..

:-(
 

8 More Discussions You Might Find Interesting

1. Programming

fwrite throws segmentation fault

Code : function sSaveTFFile ....................... iRetCode = link (caCurrentFilename, caBackupFilename); if (iRetCode == -1) { ERR_MSG2(LOG_ALERT, "Can't move %s to %s", caCurrentFilename, caBackupFilename); return(FAILURE); } iRetCode = unlink... (6 Replies)
Discussion started by: fermisoft
6 Replies

2. UNIX for Dummies Questions & Answers

grep throws in dashes?

Hey guys, I'm trying to grep for two things out of a file and I got that working but why is it randomly throwing "--" in the output? Is there a simple way to get rid of them? It only seems to do it when the line above what im looking for has numbers in it. $ egrep -i -B 1... (3 Replies)
Discussion started by: kingdbag
3 Replies

3. AIX

Copying to tape drive throws error

Hi All I am trying to copy files present in a partition (server 2) which is mounted to a different server (server 1) as tape drive is connected to it. I ran the below command to copy files within a partition: svr01:root:/sunfileserver> tar -cvf * a <foldername>/<filename>/<filename> a... (4 Replies)
Discussion started by: vathsan
4 Replies

4. Forum Support Area for Unregistered Users & Account Problems

Search throws a wobbly

Dear Administrator, Rule No.5 for unregistered users is impossible to comply with because Google search thinks that any Unix command that I search for is an attack from a virus and blocks the search. I managed to find this site from an external search, and it looks really useful. Do you... (2 Replies)
Discussion started by: Ken N
2 Replies

5. UNIX for Dummies Questions & Answers

scp throws error

My script is like STAMP=$(perl -e '($ss, $mm, $hh, $DD, $MM, $YY) = localtime(time() - 100); printf "%04d%02d%02d%02d%02d", $YY + 1900, $MM + 1, $DD, $hh, $mm') touch $STAMP /sasdata/copydata/ find /sasdata/copydata -type f ! -newer /sasdata/copydata/ -print > output3.txt awk '{print "scp ... (6 Replies)
Discussion started by: tushar_spatil
6 Replies

6. Shell Programming and Scripting

Calling shell script within awk script throws error

I am getting the following error while passing parameter to a shell script called within awk script. Any idea what's causing this issue and how to ix it ? Thanks sh: -c: line 0: syntax error near unexpected token `newline' sh: -c: line 0: `./billdatecalc.sh ... (10 Replies)
Discussion started by: Sudhakar333
10 Replies

7. Shell Programming and Scripting

Export Variable throws message

Friends, I'm trying to export a variable as follows. But getting error message "not a valid identifier". However the variable has exact value. # INSTSALL_PATH=/opt/tmp/Ora10.9/default # ORAHOME=/apps/opt/Oracle # export ${ORAHOME}=${INSTSALL_PATH} -bash: export:... (3 Replies)
Discussion started by: baluchen
3 Replies

8. Shell Programming and Scripting

awk throws makes too many open files

Hi, I have a below awk script. BEGIN { FS=","; } { system("curl -v -H \"Authorization: SSWS test" -H \"Accept: application/json\" -H \"Content-Type: application/json\" -X POST \"https://tes.test.com/api/v1/users?activate=false\" -d \'{ \"profile\": { \"firstName\": \"" $1 "... (7 Replies)
Discussion started by: Krrishv
7 Replies
ENVSUBST(1)								GNU							       ENVSUBST(1)

NAME
envsubst - substitutes environment variables in shell format strings SYNOPSIS
envsubst [OPTION] [SHELL-FORMAT] DESCRIPTION
Substitutes the values of environment variables. Operation mode: -v, --variables output the variables occurring in SHELL-FORMAT Informative output: -h, --help display this help and exit -V, --version output version information and exit In normal operation mode, standard input is copied to standard output, with references to environment variables of the form $VARIABLE or ${VARIABLE} being replaced with the corresponding values. If a SHELL-FORMAT is given, only those environment variables that are referenced in SHELL-FORMAT are substituted; otherwise all environment variables references occurring in standard input are substituted. When --variables is used, standard input is ignored, and the output consists of the environment variables that are referenced in SHELL-FOR- MAT, one per line. AUTHOR
Written by Bruno Haible. REPORTING BUGS
Report bugs to <bug-gnu-gettext@gnu.org>. COPYRIGHT
Copyright (C) 2003-2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for envsubst is maintained as a Texinfo manual. If the info and envsubst programs are properly installed at your site, the command info envsubst should give you access to the complete manual. GNU gettext-runtime 0.18.1 June 2010 ENVSUBST(1)
All times are GMT -4. The time now is 04:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy