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

Image may be NSFW.
Clik here to view.

Get the two parameter from text file in UNIX.

Hi there, In my attachment there is 'Category/Subcategory' & 'Setting'. Code: var=$(awk '/^Logon\/Logoff/ {P=0} P {print $0} FNR==1{printf("From file %s:\n", FILENAME)} /^System/ {P=1}' $file |grep...

View Article


Image may be NSFW.
Clik here to view.

Compare output of UNIX command and match data to text file

I am working on an outage script and I run a command from the command line which tells me the amount of generator failures in my market. The output of this command only gives me three digits to...

View Article


Parsing through a list of items

Hi there, Here is my checklist of items, Code: 4.1.1 Alerter 4.1.2 Client Services for Netware 4.1.3 Clipbook 4.1.4 Fax Service 4.1.5 File Replication 4.1.6 File Services for Macintosh 4.1.7 FTP...

View Article

Join with awk using sprintf

Hi, Trying to join 2 files with awk (file1 has variable number of fields; file 2 has constant number of fields) file1: Code: hook1|AA|BB|CC|DD hook2|EE|FF file2: Code: hook1|11|22 hook2|33|44...

View Article

BCP with cat not working

Hello, I am facing a typical problem in my code . If I run bcp alone it is working fine if I run BCP with cat it is not working . Not able to find where the error is occurring in cat . Can you please...

View Article


Script executed by Cron or commandline

Hello all, I have a question regarding the difference betwen cron and command line. What I would like to do is to print a statement into a logfile if a script has been executed from cron or from...

View Article

Cpio: copy failed - No space left on device when I use rpm

Hello, I want to install GCC gcc-4.8.1-2.src.rpm for AIX 6.1 when I lance my command Code: rpm -i gcc-4.8.1-2.src.rpm I have this error Code: unpacking of archive failed on file gcc-4.8.1.tar.bz2:...

View Article

Add AIX machin to my windows network

Hi, Can you explain me step by step how can add my aix 6.1 to windows network. Thans:rolleyes:

View Article


Fetching a line matching a pattern

Hi Gurus, I have a file as follows (Sample shown below but the list is very huge) Code: SCHEDULE WS1#JS1 RUNCYCLE1 : WS1#JOB1 WS1#JOB2 FOLLOWS JOB1 END SCHEDULE WS2#JS1 RUNCYCLE2 : WS1#JOB3 WS1#JOB1...

View Article


Delete line by pattern match in column

Code: file: 1|12322|tow| 5|23422|pow| 6|23423|cow| 3|34324|how| deletelines: 12322 23423 My command to delete line Code: while read NUM do awk -F"\|"  '$2 !~ /`"$NUM"`/' file >file.back mv...

View Article

How to use USB Stick in UNIXware?

I am trying to use a USB (Pen?) drive on Unixware 7.1.4. The USB stick is in the machine and the machine recognises it when I enter usbprobe as follows: Path - Address Description...

View Article

awk command to compare files by column

So I have this issue. I have 4 files. the first one is the master file who has all possible combinations: file 1 Code: -      a -      b -      c -      d -      e the other three have some of the...

View Article

Make all records with the same number of fields (awk)

Hi, input: Code: AA|BB|CC DD|EE FF what I am trying to get: Code: AA|BB|CC DD|EE| FF|| I tried to create first an UDF for printing repeats, but I think I have an issue with my END section or my array:...

View Article


Format text file to html

Hi Experts, Anybody out there figure out on how to achieve in shell scripts or tools. I have done googling to find solutions but no luck. I have thousands of .txt files to batch process, please see the...

View Article

Where have all my Bits gone?

Hi there admins/moderators, I've just found that all my bits have vanished... both Savings and Checking accounts are showing '0' as the balance. I initially thought it was nefarious carry-on to blame...

View Article


IF condition to compare file prefix

I have files with naming as below, testS123, testS223, testB1, testC1, testD1 I need to write a if condition to print 'Hello' when the file prefix is not testS* else 'Good bye'. Code: if [ $file not...

View Article

Convert CSV file to nested XML file using UNIX/PERL?

we have a CSV which i need to convert to XML using Perl or Unix shell scripting. I was able to build this XML in oracle database. However, SQL/XML query is running for long time. Hence, I'm considering...

View Article


Suse Security Settings

1) PermitEmptyPasswords is set to No # grep "^PermitEmptyPasswords" /etc/ssh/sshd_config PermitEmptyPasswords no If there is no output does it implies 'As parameter was not set mean system will also...

View Article

/etc/hosts.deny

Hi there, For /etc/hosts.deny was it used to deny access from the internet?

View Article

Data transfer in Linux

Please let me know which ports are used for data transfer, as per my understaning in Linux below ports are used for data transfer from windows to Linux. Code: ftp 21  sftp 22 (Most secure Port)  telnet...

View Article
Browsing all 16232 articles
Browse latest View live