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...
I have tried the script but it did not do the sort.
Anyone can help with the sort
Thank you
ls | grep sds | sort -k 1.2n >sds
while read file
do
echo $file
done <sds
cat sds
sds10
sds100
sds150
sds20
sds200
sds250
sds30
sds300
sds350
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...
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.