Hi
A file contains two lines and a variable contains one characters. I would like to merge them to the same file name
i.e. file name=file1
Line one = abc
Line two = def
Variable="\"
The merge in file1 will be = abc\def
Thank you
Hi
I have a variable which contains one character. The character can be any value.
I need to pass this value to a function and act on this value to split a file.
function f_split_mint
{
st=$1
i=1
echo $rec | sed 's/'$st'/\
'$st'/g' | while read line
do
if [[ -n "$line" ]]
then...
Hi
I have two scripts (script1 and script2). Script1 calls Script2.
I tried the scripts below by running script1. The result is null but I would like to have the result of abc = "y" in script1.
Thank you
Script1
#! /bin/ksh
./script1
print "abc="$abc
Script2
#! /bin/ksh
export abc="y"
The script below will take the value from tarsds and write it to a file by converting the list from one row list contains many cloumns to many rows contain one column.
'tarsds' could be = null, could be = one value or could be = more than one value.
Is there a way to simplify the script...
Hi
I want to write the list of files from a directory in order to a file (file name = sds) and read the file (sds) line by line to print the list.
i.e.
Directory contains the following files
A10
A100
A150
A20
A200
A250
A30
A300
A350
I want to write them to a file (sds) in order
A10
A20
A30...
Hi
I have a text UNIX file (file1), the file contains one line and the line contains spaces as.
Abc 1234567 abcdef log 123456789,456789
If I do grep from the shell I will get the line as in the file.
$grep log file1
$Abc 1234567 abcdef...
I have three email accounts and I would like to access them from outlook 2007 separately.
I have created 3 folders (folder1, folder2 and folder3) in the inbox folder and routed my messages to those folders by using the rules wizard.
The next stage I would like to apply same rules to the Delete...
Hi
I have a text UNIX file, the file contains one line and the line contains from 0 to thousands of characters.
Firstly, I want to check the line should not be larger than 20,000 characters.
Secondly, if the line is greater than 20,000 characters I want to split it to lines in a new file. Each...
Hi
I have a string which contain "003900" and the string could have one or many of "003900". I would like to split the string into files depends on the number of "003900" in the string.
For example
rec="0039001234 5 6 0039002345 6 8 90039001238"
File1=0039001234 5 6
File2=0039002345 6 8 9...
I have a variable as rec. rec will contain one or many of UNB possibly
rec=UNB123456789UNB2234567890UNB32345UNB4234567UNB52
I would like to change it to
rec1=UNB123456789
rec2=UNB2234567890
rec3=UNB32345
rec4=UNB4234567
rec5=UNB52
Tried to use regular expression but I could not get it right...
Hi
I have a file which contain one line of data
For example
UNB+UNOA:2+FPC1+FPA1+061026:0747+00000002++FINFH+++UNKNOWN'
UNH+00000002+FINFH:0:3:FH'BGM+++243:200610260047:306+505'UN
T+3+00000002'UNZ+1+00000002'UNB+UNOA:2+FPC1+FPA1+061024:124...
I have a variable which contains a delimiter and the value between the delimiter can be various.
i.e.
a=1234~56789~asdfgt~jfdhjrhtj~nvcnvcn
or it could be
a=12~q~jjjjjjj~erorioe~90~9824
A script to return a value for a specific delimiter.
Script name “retval”
By entering :-
retval...
Hi
I have a text file "abc" and I would like to read it.
the "abc" text file is
----------------------
abc
def
ghi
the script is
-------------
#! /bin/ksh
#
integer count=0
export count
exec 0<abc
until (( count==3 ))
do
read line
if [[ $count = 0 ]]; then...
my script
#!/bin/ksh
#
function f_a
{
flag=1
}
function f_b
{
integer flag=0
f_a
if [[ $flag = 1 ]]; then
echo "flag=1"
fi
}
.
.
.
from function f_a I would like to return the value of flag equal 1 to function f_b.
Any help will be appreciated.
Thanks
Kais
I have a variable and I would like to get some of that variable.
For example
${icsdir}=/ics2/db/icssysparms and I would like a new variable abc=ics2
Any help will be appreciated.
Thanks
Kais
Hi
I am trying to increase the logic volume size by using sam. When I entered the size I presented with the error below.
I unmounted the file system but I am not sure what are stopping me from increase the size?
Any help will be appreciated.
Thank you
Logical volume /dev/icm1/SCCSMaster is...
Hi
I would like to extract data from a file. The delimiter is space but some time the file contains more than one space. I tried to use the cut command and use the space as delimiter but unfortunately on some occasion does not work because the file contains more than one space.
Example of the...
I would like to create a file with the name as "/abc/asd/", Unix use / as the dir structure.
Is it possible to create? the the answer is yes how?
Thanks
Kais
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.