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 SkipVought 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
  • 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

    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
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. alhassani54

    Use sed to split a string

    Thank you it is sorted.
  11. 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...
  12. 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...
  13. 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...
  14. alhassani54

    find multiple matching in a file

    Below a script will return:- ============================ Start: 9:20 Start: 11:55 Start: 01:22 Start: 01:25 Start: 01:32 End: 10:30 End: 12:54 End: 04:45 End: 04:55 End: 04:41 Clone: 11:50 Clone: 06:20 Clone: 06:40 Clone: 06:50 from the file abc:- =================== Start: 9:20 End: 10:30...
  15. alhassani54

    Set a variable to one space

    I would like to set a variable to one space. If I do a=&quot; &quot; a will be null but I want a=one space. Any help will be appreciated. Thanks
  16. 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...
  17. alhassani54

    read a tax file

    Thank you, sorted
  18. 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...
  19. alhassani54

    Return a val from a function

    I sorted now, thank you
  20. alhassani54

    Return a val from a function

    I exported flag inside the function f_b and outside but it did not work.

Part and Inventory Search

Back
Top