Search Results

Search: Posts Made By: ambarginni
1,209
Posted By zaxxon
I added some "permission denied"... something...
I added some "permission denied"... something like this?


$ cat infile
cp: writing `/testX/file2016-08-11_07-03-10AM/ext/lib/libclntshcore.so.12.1': No space left on device
cp: writing...
12,013
Posted By Aia
@fails = grep /FileNotFoundException\|I\/O...
@fails = grep /FileNotFoundException\|I\/O exception\|fail$/, ( grep !/^\./, readdir LOGDIR );
[/QUOTE]
Actually, grep !/^\./ should not be considered as stated. grep in Perl is not similar to the...
12,013
Posted By bakunin
To be honest, i can only guess, because i...
To be honest, i can only guess, because i habitually avoid perl like the plague. It seems to me that: !/^\./ is the regular expression, where "!" means: reverse the search, give every line NOT...
12,013
Posted By bakunin
It is relatively easy: the forward slash has a...
It is relatively easy: the forward slash has a special meaning. Whenever you want to use a character with a special meaning literally you need to "escape" it. Escaping is done by prepending it with a...
5,222
Posted By Aia
In Perl these are the rules to create variable...
In Perl these are the rules to create variable names:


Therefore, this is not valid in your code.
$2_zip_dirs

You can find it here in your code:
foreach my $dir ( split /\s/, $2_zip_dirs) {
6,795
Posted By Yoda
I checked the bash manual page and verified that...
I checked the bash manual page and verified that the typeset options that you listed are for bash, not ksh:

From bash manual:
typeset [-afFirtx] [-p] [name[=value] ...]
Declare variables...
71,412
Posted By jim mcnamara
Newvariable=$( echo "$Ctrcd" | tr -s '[:upper:]'...
Newvariable=$( echo "$Ctrcd" | tr -s '[:upper:]' '[:lower:]' )
6,795
Posted By radoulov
typeset -u is supported by ksh and zsh. You seem...
typeset -u is supported by ksh and zsh. You seem to be using bash.
Recent bash versions (>= 4) support the following syntax:

xname1=${mname1^^}
6,795
Posted By Yoda
Use Korn Shell, put below line as your shebang: ...
Use Korn Shell, put below line as your shebang:
#!/bin/ksh
4,895
Posted By Scrutinizer
The difference with the earlier explanation...
The difference with the earlier explanation (https://www.unix.com/302608067-post17.html) given by itkamaraj (https://www.unix.com/members/302077176.html) is !A[$4]++ . This means if the value in array...
4,895
Posted By Scrutinizer
OK in that case, try this: awk -F\| '!/^#/ &&...
OK in that case, try this:
awk -F\| '!/^#/ && !A[$4]++{print $4}' infile
4,895
Posted By itkamaraj
-F\| --> Filed seperator is | !/#/ -->...
-F\| --> Filed seperator is |

!/#/ --> process the lines which is not having #

print $4 --> print the 4th filed ( seperated by | )

sort -u --> print only unique values from the awk...
4,895
Posted By itkamaraj
$ nawk -F\| '!/#/{print $4}' SNA_DB_UPG.list |...
$ nawk -F\| '!/#/{print $4}' SNA_DB_UPG.list | sort -u
$PLATFORM_BIN/reload_PA_TABLE 1620_LM
$PLATFORM_BIN/reload_PA_TABLE 1626_LMT
$PLATFORM_BIN/reload_PA_TABLE 1830PSS_32...
4,895
Posted By itkamaraj
just noticed.. please remove the...
just noticed..

please remove the highlighted single quote


awk' '{print $1}' SNA_DB_UPG.list
4,929
Posted By michaelrozar17
That's actually the syntax of if command. There...
That's actually the syntax of if command. There must be a space surrounding [ and ]
4,929
Posted By michaelrozar17
Try giving a space between " and ] if [ -z...
Try giving a space between " and ] if [ -z "$build_info_table" ]
38,483
Posted By daWonderer
echo $1 > tmp.out xname1=$(awk...
echo $1 > tmp.out
xname1=$(awk '{up=toupper($1); printf up "\n"}' tmp.out)
not tested inside of a script..
38,483
Posted By itkamaraj
$ echo "abc" | awk '{print toupper($0)}' ...
$ echo "abc" | awk '{print toupper($0)}'
ABC
38,483
Posted By ctsgnb
echo "abc" | tr '[:lower:]' '[:upper:]' ABC ...
echo "abc" | tr '[:lower:]' '[:upper:]'
ABC

But the best solution in my opinion is still to use the "typeset -u" way mentionned in my first post
38,483
Posted By ctsgnb
typeset -u mname1=$1$ typeset -u name="test" $...
typeset -u mname1=$1$ typeset -u name="test"
$ echo $name
TEST

You can also put it in 2 lines :

$ typeset -u name
$ name=toto
$ echo $name
TOTO
3,143
Posted By browncoat
It might be worth trying to replace sqlplus -s...
It might be worth trying to replace
sqlplus -s sna/dbmanager <<! | tee -a $LOGFILE
with
(sqlplus -s sna/dbmanager | tee -a $LOGFILE) <<!
What I am thinking might be causing the issue:
Your might...
3,143
Posted By itkamaraj
$? is a special variable which says the previous...
$? is a special variable which says the previous command status.

most of the commands exit with 0 ( if it is successfully executed )

---------- Post updated at 04:47 PM ---------- Previous...
1,528
Posted By CarloM
By 'documentation purposes' do you mean for a...
By 'documentation purposes' do you mean for a here document (http://en.wikipedia.org/wiki/Here_document)?

In theory, you can use almost any string as the delimiter, but normally you'll see 'EOF'...
1,528
Posted By methyl
If I understand you correctly. There is no...
If I understand you correctly. There is no multi-line documentation symbol in unix Shell (unlike some programming languages). Anything from a hash sign onwards on the same line is comment.

#The...
1,528
Posted By Corona688
Not really, no.
Not really, no.
Showing results 1 to 25 of 32

 
All times are GMT -4. The time now is 02:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy