Summary: Shell Scripting -- Variables In the main script i have exported the variable and accessing it in another file but when i echo the value the value of t...
Summary: I am having trouble exporting variables set in a script to a function inside the script. 1. The variable must be set outside the function because it w...
Summary: Hi I have a string in one variable str1="'abcd '" and i want to replace spaces with * and result in another variable str2. Pl. help me how to do wi...
Summary: Is it possible to pass a Unix environment variable to sed? The example script I have included shows what I am trying to do and the header explains why...
Summary: I need create a variable for store command: grep -y 'ORA-' $DIR_LOG ARQ. after i need to validate this statment in the sheel script. Examples IF...
Summary: Hi! I'm trying to use my shell script variables in my awk-line. Is not working! month3 is my variable and i'm aware that I can't use the $-prefix in a...
Summary: Hi all, I'm new to UNIX, so my knowledge is still quite limited. This might therefore be a bit of a dumb question. I am running jobs in parallel from ...
Summary: I have a backup directory with a few hundred thousand files, several thousand from each day. I want to tar up the files into 1 or more files for each...
Summary: My original post assumed the actual filename was the replacement text. That's why I was able to use awk's FILENAME internal variable. You can embed ...
Summary: I need to replace anything immediately after the pattern "standard01/" in a file with the value of a variable I don't know the length of the characte...
Summary: Hi, I'm pretty new to korn shell scripting and I would like to know how to assign a variable to the results of an awk function. I am writing a korn sh...
Summary: I need to calculate the Yesterday's date and received a good code from Unix forum. I need to assign the yesterdays Date (MONTH and DATE eg. 1229 for D...
Summary: I need to read a specific part of an input file and assign the data as variables until it reaches the "END". So, for captain coke, I need rum, 2, cok...
Summary: hi i hav a question,suppose i hav a variable like var="12,134,13" now i want to put 12 134 and 13 in a seperate variable.i want to ask how to i repla...
Summary: Hi, Im trying to set variables in awk script but does not work, I dont know what Im doint wrong, this is my script. #!/bin/sh snmp-cpu="`snmpwalk -v ...
Summary: Hi, How can I export variables from awk? For example, I have this script: cat awkscr #start of scr bdf | awk '(/ *% /) && (length($NF)>maxl) {maxl=len...
Summary: I have PS1='$NODE [$ORACLE_SID]> ' Everytime the $ORACLE_SID changes the Unix Prompt (PS1) value changes. -- Similarly I want to set my own variable P...
Summary: Can anyone help with using grep to search a file for a string stored in a variable. ie x=20:30 grep $x filename It works fine when I can manually use...