Search Results

Search: Posts Made By: jdsignature88
1,311
Posted By jdsignature88
Thank you, after run ./myscript.sh ...
Thank you,

after run ./myscript.sh

nothing happened! where to get the output?
thanks
1,311
Posted By jdsignature88
Thanks, I am testing now ---------- Post...
Thanks, I am testing now

---------- Post updated at 09:50 PM ---------- Previous update was at 09:44 PM ----------

:q!
bash-3.00$ sh -x ttt.sh
+ deli = |
ttt.sh: deli: not found
+ ppattern...
1,311
Posted By jdsignature88
bash script
How can i conver the following to the bash shell script?


#! /bin/csh

set deli = '|'
set ppattern = ""
foreach i(`cat pattern`)
set ppattern = "$i$deli$ppattern"
echo $ppattern
end...
3,173
Posted By jdsignature88
how to build a pipe delimited string
#! /bin/csh

set delimiter = |
foreach i (*)
set str_deli="$i$delimiter"

question: how to retain the value of str_deli so i can build a pipe delimited string?
end
8,559
Posted By jdsignature88
invalid null command
#! /bin/csh
set pattern = ""
set deli = |
foreach i ( `cat pattern`)
set pattern = "$pattern$deli$i"

end

all i want to accomplish is create a string a|b|c, but instead I got an...
1,866
Posted By jdsignature88
you have been great help, thanks ----------...
you have been great help, thanks

---------- Post updated at 01:40 PM ---------- Previous update was at 01:33 PM ----------

1 follow up question:

for instance, there are mutliple xxx.txt...
1,866
Posted By jdsignature88
Thanks you
is possible for me to have the same file name after deleting some rows by your approach?

thanks?
1,866
Posted By jdsignature88
delete the rows from the files
for example:


this is the data file test.txt with more than 1000 rows

1. ccc 200
2.ddd 300
3.eee 400
4 fff 5000
........

1000 ddd 500
....

I would like to keep the rows...
8,652
Posted By jdsignature88
how to create the files dynamically in c shell script
how can i CREATE a txt file dynamically in c shell:

for instance:


#! /bin/csh

for each i (*)

cat>file$i.txt

for each j

do ....
6,564
Posted By jdsignature88
set : syntax error
#! /bin/csh
set umr=UMR
set fd1=a
set fd2=b
set ext1=1.txt
set ext2=2.txt
set ext=.txt
#foreach i ( `ls`)
foreach i ( *)
set file_nm=$i
set bh_nm=`echo $file_nm | cut -d"_" -f2`
...
14,501
Posted By jdsignature88
if expression syntax error
#! /bin/csh
set umr=UMR
foreach i ( `ls`)
set file_nm=$i
set bh_nm=`echo $file_nm | cut -d"_" -f2`

if($bh_nm !=$umr) then
{
set bh_ext=`echo $file_nm | cut -d"_"...
1,226
Posted By jdsignature88
if expresion syntax error
#! /bin/csh
set umr=UMR
foreach i ( `ls`)
set file_nm=$i
set bh_nm=`echo $file_nm | cut -d"_" -f2`

if($bh_nm !=$umr) then
{
set bh_ext=`echo $file_nm | cut -d"_"...
6,617
Posted By jdsignature88
multiple if statement
#! /bin/csh
set umr=UMR
foreach i ( `ls`)
set file_nm=$i
set bh_nm=`echo $file_nm | cut -d"_" -f2`

if($bh_nm !=$umr) then
{
set bh_ext=`echo $file_nm | cut -d"_"...
1,760
Posted By jdsignature88
String concatenation problems
#! /bin/csh
set tt=12345_UMR_BH452_3_2.txt
set rr=`echo $tt | cut -d_ -f1`
set rr1=welcome
set ff=$rr $rr1
echo $ff


why $ff returned only 12345 and not 12345welcome? thanks
2,439
Posted By jdsignature88
string concatnation
here is the script

#! /bin/csh
set tt=12345_UMR_BH452_3_2.txt
set rr=`echo $tt | cut -d_ -f1`
set rr1=welcome
set ff=$rr $rr1
echo $ff


why echo $ff still return 12345 and not...
2,439
Posted By jdsignature88
why the set rr='echo string|cut not working
I am new to the c shell script, can you let me know why the set rr= is not working.

C shell script
#! /bin/csh

Set tt= 12345_UMR_BH452_3_2.txt
set rr='echo $tt | cut –d”_” -f1'
syntax...
Showing results 1 to 16 of 16

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