10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to do 2 things in single line that is evaluating a command to get return code and store $2 of awk if the command exit code is 0.
eval "ade desc ${filename}@@/<branch_name> | grep Version | awk '{print $2}' 2>&1 1>/dev/null"
ret=$?
echo "$ret $val"
if
then
... (3 Replies)
Discussion started by: ezee
3 Replies
2. Shell Programming and Scripting
Hi
I am trying to remove duplicates on keys in a file and so far the below seems to work
sort -t\| -k2,4 input.txt| awk -F'|' '{if (NR==1) print $0} {x=$2 $3 $4} NR>1 {if ($2 $3 $4 != y) {print $0}} {y=x}'
and now I want to pass comma seperated column number list to the script and use... (3 Replies)
Discussion started by: zulfi123786
3 Replies
3. Shell Programming and Scripting
anyone has any info on why this is complaining???
vivek@vivek-c5e55ef2e ~/TAC
$ zoneCounter=1
vivek@vivek-c5e55ef2e ~/TAC
$ optUsage1=23%
vivek@vivek-c5e55ef2e ~/TAC
$ eval eval echo "<th>Zone $zoneCounter </th><th align=\"left\"> \$optUsage$zoneCounter </th>"
-bash: syntax error... (13 Replies)
Discussion started by: vivek d r
13 Replies
4. Shell Programming and Scripting
anyone has any info on why this is complaining???
vivek@vivek-c5e55ef2e ~/TAC
$ zoneCounter=1
vivek@vivek-c5e55ef2e ~/TAC
$ optUsage1=23%
vivek@vivek-c5e55ef2e ~/TAC
$ eval eval echo "<th>Zone $zoneCounter </th><th align=\"left\"> \$optUsage$zoneCounter </th>"
-bash: syntax error... (1 Reply)
Discussion started by: vivek d r
1 Replies
5. Shell Programming and Scripting
Hi all,
some small script with eval turned me to crazy.
my OS is linux
Linux s10-1310 2.6.16.53-0.8.PTF.434477.3.TDC.0-smp #1 SMP Fri Aug 31 06:07:27 PDT 2007 x86_64 x86_64 x86_64 GNU/Linux
below script works well
#!/bin/bash
eval ssh remotehost date
eval ssh remotehost ls
below... (1 Reply)
Discussion started by: summer_cherry
1 Replies
6. Linux
Dear All
On my Linux server, I need to separate the individual logs coming from various modules concurrently. Please find below a sample of the logs:
But when I run it, I am receiving the following error:
-bash: -f1.log : command not found
-bash: $LOGFILE : ambiguous redirect
Can you... (4 Replies)
Discussion started by: hadimotamedi
4 Replies
7. Shell Programming and Scripting
typeset -i i=1
while read -r filename; do
Splitfile=`$Targetfile_$i.txt`
awk 'substr($0,1,5) == substr($filename,1,5) && substr($0,526,2) == substr($filename,6,2) && substr($0,750,12) == substr($filename,8,12)' $SourceFilename >> $Splitfile
i=i+1
done < /tmp/list.out
I am using this logic... (1 Reply)
Discussion started by: pukars4u
1 Replies
8. Shell Programming and Scripting
Hi,
Some part of output:
================
$ hwmgr show scsi
SCSI DEVICE DEVICE DRIVER NUM DEVICE FIRST
HWID: DEVICEID HOSTNAME TYPE SUBTYPE OWNER PATH FILE VALID PATH
-------------------------------------------------------------------------
68: ... (10 Replies)
Discussion started by: mansa
10 Replies
9. UNIX for Advanced & Expert Users
#!/bin/ksh
LOG_DATE=`date +%Y%m`
export LOG_DATE
cd D:/Informatica/Informatica_share/SrcFiles/l
# mv SITE_ACTIVITY${LOG_DATE}*.CSV D:/Informatica/Informatica_share/SrcFiles/SITE_ACTIVITY${LOG_DATE}*.CSV
# mv SITE_ACTIVITY20050914114546.CSV... (2 Replies)
Discussion started by: vivekanandarpat
2 Replies
10. Shell Programming and Scripting
#!/bin/ksh
LOG_DATE=`date +%Y%m`
export LOG_DATE
cd D:/Informatica/Informatica_share/SrcFiles/l
# mv SITE_ACTIVITY${LOG_DATE}*.CSV D:/Informatica/Informatica_share/SrcFiles/SITE_ACTIVITY${LOG_DATE}*.CSV
# mv SITE_ACTIVITY20050914114546.CSV... (6 Replies)
Discussion started by: vivekanandarpat
6 Replies