Hi,
have a basic query.
Please see the below code:
list="one two three"
for var in $list ; do
echo $var
list="nolist"
Done
Wht if I want to print only first/ last line in the list
Eg one & three
Regards
er_ashu (3 Replies)
Hi! I have a simple question about using a for loop.
I'm trying to open up all the zip files in the currect directory with ark, but I am getting the error "bash: syntax error near unexpected token `for $i ; do ark $i ; done ;
I looked in the info pages for bash, but I can't seem to figure... (2 Replies)
sorry for being dumb here, but is there a way my for loop can take an entire line of a file into consideration instead of each word in a line... ill explain
if i have a file like this
# cat list
serial: 23124
hostname: server1
and a script that does this
# cat list.sh
#!/bin/sh
... (6 Replies)
Hi everyone - just like to say great forum...I've learned a lot off here but I just can't figure this one out...(first post)
I'm writing a script to monitor a directory and email the latest modified file....(I realize there are better ways than I'm trying here...I don't like copying and pasting... (5 Replies)
hey guys
I would really appreciate some help, i need to do a project for a job that requires minimal UNIX scripting and im REALLY stuck
basically Im stuck at what i believe is something really simple but i just dont have a clue how to do it efficiently and properly and i REALLY appreciate some... (16 Replies)
Hi, I am trying to make a script to manage log. I want to write the name of the .gz I moved and the date :
for i in `ls $replog/*.gz`
do
echo " $i "
`echo $i date +%d:%m:%Y`
`echo $datee `>> $replog/mrnet.log
mv $i /var/log/vieux-logs
done
I need to echo... (10 Replies)
Hi,
Sorry if this is a newbie question. I guess you can use either awk or shell script for this sequence of operations, but knowing very little about either of them I'm not sure how I should try to write this.
The basic objective is to copy certain files that are scattered all over my... (10 Replies)
I'm obviously very new to this. I'm trying to write a simple for loop that will read the directory names in /Users and then copy a file into the same subdir in each user directory.
I have this, and it works but it isn't great.
#!/bin/bash
HOMEDIRS=/Users/*
for dirs in $HOMEDIRS; do
if ];... (5 Replies)
Oracle Linux : 6.4/bash shell
In the below I want to break out of the loop when it enters the 5th iteration.
#!/bin/bash
for i in 1 2 3 4 5 6
do
echo "$i"
if
echo "Oh Nooo... i = $i. I need to stop the iteration and jump out of the loop"
then break
fi
done
But, it only... (3 Replies)
Discussion started by: John K
3 Replies
LEARN ABOUT CENTOS
th_isaccept
thai/thinp.h(3) libthai thai/thinp.h(3)NAME
thai/thinp.h -
Thai string input sequence filtering.
SYNOPSIS
Data Structures
struct thinpconv_t
Input sequence correction info.
Enumerations
enum thstrict_t { ISC_PASSTHROUGH = 0, ISC_BASICCHECK = 1, ISC_STRICT = 2 }
Strictness of input sequence checking, according to WTT 2.0.
Functions
int th_isaccept (thchar_t c1, thchar_t c2, thstrict_t s)
Check for acceptance of input sequence.
int th_validate (struct thcell_t context, thchar_t c, struct thinpconv_t *conv)
Check and try to correct input sequence.
Detailed Description
Thai string input sequence filtering.
Enumeration Type Documentation
enum thstrict_t
Strictness of input sequence checking, according to WTT 2.0.
Enumerator
ISC_PASSTHROUGH
No check
ISC_BASICCHECK
Basic check
ISC_STRICT
Strict check
Function Documentation
int th_isaccept (thchar_tc1, thchar_tc2, thstrict_ts)
Check for acceptance of input sequence.
Parameters:
c1 : previous character
c2 : the newly input character
s : strictness level
Returns:
non-zero if accepted, 0 otherwise
Checks if, according to WTT 2.0 strictness level s, c2 is allowed after c1.
int th_validate (struct thcell_tcontext, thchar_tc, struct thinpconv_t *conv)
Check and try to correct input sequence.
Parameters:
context : previous cell
c : the newly input character
conv : the storage for resulting correction info
Returns:
0 if the input is to be rejected non-zero otherwise.
Given the previous cell as context, edit the input buffer using the given input c, maintaining WTT canonical order, and do some convenient
correction in conv.
Author
Generated automatically by Doxygen for libthai from the source code.
Version 0.1.14 Tue Jun 17 2014 thai/thinp.h(3)