9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the following files
list.txt
string1<TAB>ABC
string2<TAB>DEF
string3<TAB>GHIquery.txt
ABC
DEF
GHI
ABCNow I want to check, if a string in the first column of list.txt is twice in query.txt
so my command is:
while IFS=$'\t' read k v ; do if (($(grep -i '$v' query.txt | wc... (2 Replies)
Discussion started by: tons92
2 Replies
2. Shell Programming and Scripting
Hello
So i have that script collection, in which i have a single script to create a configuration file.
In there, i have multiple occourences of something like this:
prj_title=$(tui-read "What is the TITLE? ($prj_name):")
] && prj_title="${prj_name/_/ }"
They all work as expected, if... (5 Replies)
Discussion started by: sea
5 Replies
3. Shell Programming and Scripting
Hi. The data file is as below:
2000922111111100232091212098324....
2123011230912832094820943684896....
3435983453409583405938453049583....
.
.
.
I need to get only the rows that match my criteria. For example: those at characters 5-10 should equal to "922111" (thus getting only the 1st... (7 Replies)
Discussion started by: daytripper1021
7 Replies
4. Shell Programming and Scripting
I am reading from a file and executing the jobs with/without parameters as the job requires.
File
job1 R
job2
job3 Y 123
if
then
<job>.ksh
else
<job>.ksh $params
fi
This works fine if the line read from the file has parameters
it executes like job1.ksh R
But for... (2 Replies)
Discussion started by: nw2unx123
2 Replies
5. Shell Programming and Scripting
I want to append file with a string but before doing that i want to check if this string already exist in that file.I tried with grep on Solaris 10 but unsuccessful.Man pages from grep seems to suggest if the string is found command status will be 0 and if not 1.But i am not finding it.May be i... (2 Replies)
Discussion started by: sahil_shine
2 Replies
6. Shell Programming and Scripting
I want to check if the string is WINDOWS-1251 or UTF-8
can you help me to find the string encoding???
or maybe to get URL Content-Type charset with wget?
this is my function on PHP
function check_utf8($str) {
$len = strlen($str);
for($i = 0; $i < $len; $i++){
$c =... (2 Replies)
Discussion started by: sanantonio7777
2 Replies
7. Shell Programming and Scripting
I want to search a file to check if there is string a before string b:
string a, b might not necessarily be in the file, and to return a boolean
string a
(any text)
string b
i have tried for an hour to do this with perl, grep, etc. but no luck
grep doesnt search for patterns... (7 Replies)
Discussion started by: vanessafan99
7 Replies
8. Shell Programming and Scripting
Hello All,
Plz help me with:
I have a csv file with data separated by ',' and optionally enclosed by "". I want to check each of these values to see if they exceed the specified string length, and if they do I want to cut just that value to the max length allowed and keep the csv format as it... (9 Replies)
Discussion started by: ozzy80
9 Replies
9. UNIX for Dummies Questions & Answers
Hi guys,
I am not very experienced in writing ksh scripts and I am trying to write a piece of code that indicates if a given string contains only digits and no alphabet (upper or lower case). If i write it my way it would turn out to have a lot of comparisons.. :eek:
Thanks a lot in... (3 Replies)
Discussion started by: lakshmikanth
3 Replies