Usage of zgrep
Hi, I have multiple files with name pattern as *.tar.gz, I want to search a standalone string inside it. Code: zgrep -a 707794 *.tar.gz Result: aa.tar.gz: 1|2|7.0707794|a|b|c ab.tar.gz:...
View ArticleMozilla firefox browser is not working
Hello, We enabled X11 and xming is riunning. we used to open firefox window using below command on AIX. /usr/bin/firefox Xclock is working fine now. But for some reason firefox stopped working on one...
View ArticleHow to remove duplicate text blocks from a file?
Hi All I have a list of files which will have duplicate list of blocks of text. Following is a sample of the file, I have removed the sensitive information from the file. All the code samples starts...
View ArticleFile splitting script help
Hi All, I have file in my system with below data Code: PP1234512345671234567CABC PP1234512345671234567BABC PP1234512345671234567BABC PP1234512345671234567CABC PP1234512345671234567DABC...
View ArticleAa_app varible in Linux
Hi, I am analyzing linux script, below is the following script line Code: ${AA_APP:-/opt/ty/aa}/sbin/save_file_list ApplEnv.prererun ${AA_APP:-/opt/ty/aa}/sbin/ApplEnv.install_save_list I really dont...
View ArticleNeed script for making files based on some conditions.
Hi All, I have a text file (code_data.txt) with the followig data. Code: AMAR AB123456 XYZ KIRAN CB789 ABC RAJ CS78890 XYZ KAMESH...
View Articleawk manipulation
hello I have example file Code: AA 11 BB 22 CC 33 And what I expect to have Code: -a AA=11 -a BB=22 -a CC=33 can anyone help how I have this using awk?
View ArticleAutomatically correct a File Name
Hi All Need a help to understand how one can automatically correct a file name using a shell script even if it is in a completely different format... Ex : adv_OK_0215_mem_rules_firing.txt /...
View ArticleRead character and use as separator
Hi all, I'm trying to read in a character and use it as a separater on a string: Code: #!/bin/ksh echo "Enter input line" read input_header echo "Enter separator:" read separator IFS="$separator" read...
View Article[BASH] Getting a filename its extension
Heyas As i often have decide things upon a filename its extension, i thought i'd write a script: Just wondering if there would be a more efficent way? Code: out="" FN=$( echo "$1" | sed s," ","",g)...
View ArticleSolaris 11.2 upgrade question
Currently we are having solaris 11.1 SRU 11.1.21.4.1 installed on server. We need to upgrade it to solaris 11.2 SRU 11.2.9.5.0 Is it possible to upgrade to SRU 11.2.9.50 directly by downloading repo...
View ArticleGet first and last time entries for a given date in CSV file
CSV date sorted file has multiple entries for most dates. Need to eliminate all but the first and last entries of each date, being the start and end times for that day. Code: 2009-11-20,23:57:46...
View ArticleSubstitute first column based on second column
Hi, I have files with lines that look like Code: HSQ1008:141:D0CC8ACXX:3:1106:17255:124378 163 chr14 I'm wondering how I can output a file that appends /1 if the second column is 99 or 83 and a...
View Article[FUN] Get some stats of your project/s
Heya Ever wanted to have some basic stats of your projects? Like: Code: ./stats.sh ######################################## Project stats for "tui" ######################################## 260...
View ArticleAIX sendmail and tls
The situation Code: Version AIX7.1/8.14.4 Compiled with: DNSMAP LDAPMAP LDAP_REFERRALS LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET NETINET6...
View ArticleNot replacing using sed
Hi all, I am trying to change the below word. but the changes is not reflecting in the new file Code: sed -n 's/apple/orange/' filename ---------- Post updated at 12:51 AM ---------- Previous update...
View ArticlePassing Variable in -mtime command
Hi, As the process of log cleanup, Im using the below command Code: find $DIR -mtime +3 -type f -exec gzip {} \; The problem is I want to pass +3 as variable in my unix shell. I have defined ZPDATE=+3...
View ArticleTrigger email from script if the Special Character replacement is successfull
Hello Gurus, I have a script developed... Code: #!/bin/bash #--------------------------------------------------------------------- # This pScript will remove/replace the special characters fromfiles...
View Article[BASH] read 'line' issue with leading tabs and virtual line breaks
Heyas I'm trying to read/display a file its content and put borders around it (tui-cat / tui-cat -t(ypwriter). The typewriter-part is a 'bonus' but still has its own flaws, but thats for later. So in...
View ArticleIf contents of A are in B then move the common contents to C
Hallo Team, I have 2 .csv files file A has 47600 lines and file B has 67000 lines FILEA Code: SD0o9rb01-1d320ddbcc8d220f572739ebed5f58d1-v300g00 SD8bt0101-a0810bfe0e3396060126ec51b30dac0a-v300g00...
View Article