Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: alhassani54
  • Content: Threads
  • Order by date
  1. alhassani54

    Merge two lines

    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
  2. alhassani54

    Call a function with Parameter

    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...
  3. alhassani54

    Exporting variable

    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"
  4. alhassani54

    convert a list from one row to many rows

    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...
  5. alhassani54

    Write to a file and read the file again

    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...
  6. alhassani54

    grep command

    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...
  7. alhassani54

    Configuring multiple accounts in outlook 2007

    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...
  8. alhassani54

    Split a text line in UNIX file

    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...
  9. alhassani54

    Use sed to split a string

    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...
  10. alhassani54

    Find a parttern in a Variable

    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...
  11. alhassani54

    split on unix file to two files

    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...
  12. alhassani54

    Set a variable to one space

    I would like to set a variable to one space. If I do a=" " a will be null but I want a=one space. Any help will be appreciated. Thanks
  13. alhassani54

    Find a value in a variable

    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...
  14. alhassani54

    read a tax file

    Hi I have a text file &quot;abc&quot; and I would like to read it. the &quot;abc&quot; 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...
  15. alhassani54

    Return a val from a function

    my script #!/bin/ksh # function f_a { flag=1 } function f_b { integer flag=0 f_a if [[ $flag = 1 ]]; then echo &quot;flag=1&quot; 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
  16. alhassani54

    Read a core dump file

    Hi I would like to read a core dump file. Do I use the strings command? Thanks Kais
  17. alhassani54

    return a value

    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
  18. alhassani54

    Increase the logic volume

    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...
  19. alhassani54

    extract data from file

    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...
  20. alhassani54

    create unix file

    I would like to create a file with the name as &quot;/abc/asd/&quot;, Unix use / as the dir structure. Is it possible to create? the the answer is yes how? Thanks Kais

Part and Inventory Search

Back
Top