10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Trying to do so
echo "111:222:333" |awk -F: '{system("export TESTO=" $2)}'But it doesn't work (2 Replies)
Discussion started by: urello
2 Replies
2. UNIX for Dummies Questions & Answers
I am having a problem with a nested if. I am sure I am overlooking something. I check for the existence of $Pidfl3 and it exists, o this condition I then want to check for the existence of a next file and remove it. The first if is executed, but on the second if I get test: argument expected.
My... (4 Replies)
Discussion started by: Charles Swart
4 Replies
3. Shell Programming and Scripting
Hi All,
i have a requirement where i have to run a script with at least 25 arguements and position of arguements can also change. the unapropriate way is like below. can we achieve this in more good and precise way??
#!/bin/ksh
##script is sample.ksh
age=$1
gender=$2
class=$3
.
.
.... (3 Replies)
Discussion started by: Lakshman_Gupta
3 Replies
4. Shell Programming and Scripting
Hi,
i m trying to create script which logic is like below.
if ; then
x=`cat /tmp/testoutput.log | grep STOP | wc -l`
y=`cat /tmp/testoutput.log | grep RUN | wc -l`
if ; then
echo "process stop"
if ; then
echo "process running "
else
echo "file not found"
fi
----------------... (2 Replies)
Discussion started by: tapia
2 Replies
5. Shell Programming and Scripting
for server in $(echo `cat /tmp/ScanHosts_${USERSNAME}.TXT`)
do
for portnumber in $(echo `cat /tmp/ScanPorts_${USERSNAME}.TXT`)
do
#echo ${server} ${portnumber}
... (3 Replies)
Discussion started by: SkySmart
3 Replies
6. Shell Programming and Scripting
Ok, this one isn't for everybody, it's pretty tough and I've spent a good deal of time on it without figuring it out yet.
Can anybody get this script to work:
#!/bin/bash
cq_fname="%let outputfile="/user/cq_"$1".csv";"
sed "29s/.*/\"$cq_fname\"/" file1.sas >... (3 Replies)
Discussion started by: nocloud
3 Replies
7. Shell Programming and Scripting
I am trying to use two nested for loops to process some files and then create a new file using both variables in the output file name. I have several files in this naming style:
S1_L3_all_R1.fastq
S1_L3_all_R2.fastq
S1_L4_all_R1.fastq
S1_L4_all_R2.fastq
.
.
S1_L8_all_R1.fastq... (3 Replies)
Discussion started by: aminards
3 Replies
8. Shell Programming and Scripting
Hi,
I have to assign a value for a varaiable based on a Input. I have written the below code:
if
then
nf=65
elif
then
nf=46
elif
then
nf=164
elif
then
nf=545
elif
then
nf=56
elif
then (3 Replies)
Discussion started by: machomaddy
3 Replies
9. Shell Programming and Scripting
Help,
I have a ksh script that has some variables within the grep command, I am then setting another variable that greps the variables that have greps within them.
cat $WORKINGDIR/meter_list.txt | while read meter
do
serialnum=$(cat masterlogfile.txt | grep "$meter" | awk '{ print $19 }'... (7 Replies)
Discussion started by: srichard9
7 Replies
10. Programming
Hello everybody,
I am having problem in converting byte array variables to Hexa String variables for Linux. I have done, converting byte array variables to Hexa String variables for Windows but same function doesn't work for linux. Is there any difference in OS ? The code for Windows is given... (2 Replies)
Discussion started by: ritesh_163
2 Replies