Quantcast
Channel: UNIX and Linux Forums
Browsing all 16232 articles
Browse latest View live

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 Article


Mozilla 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 Article


How 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 Article

Image may be NSFW.
Clik here to view.

File splitting script help

Hi All, I have file in my system with below data Code: PP1234512345671234567CABC PP1234512345671234567BABC PP1234512345671234567BABC PP1234512345671234567CABC PP1234512345671234567DABC...

View Article

Aa_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 Article


Need 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 Article

awk 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 Article

Automatically 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 Article


Read 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 Article

Solaris 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 Article

Get 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 Article

Substitute 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 Article

AIX 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 Article


Not 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 Article

Passing 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 Article


Image may be NSFW.
Clik here to view.

Trigger 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 Article

If 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
Browsing all 16232 articles
Browse latest View live