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

Interface goes into promiscuous mode

Hi all, I am using a Linux VM. Once the node boots up, I am able to access it and it is able to ping its default gateway. At that time, the config is; Code: eth1      Link encap:Ethernet  HWaddr...

View Article


BASH - Need to echo for loop output to one line

I'm trying to echo the release version of some of our Linux servers. Typically I do these types of things by "catting" a text file with the host names, "ssh-ing" to the host and running my string. This...

View Article


Find/replace alpha characters in string

Hi, I would like to find a 3-letter character series in a string/variable and replace it with x's. An example set of strings is: 563MS333_101_afp_400-100_screening 563MS333_104-525_rjk_525_screening...

View Article

Line count of trace files for 24 period

Hi, Using solaris 10 5.10 o/s I am learning awk as I work here on the job. What I need to do is isolate the trace file for the last 24 hours. After that I need to open those trace files and search for...

View Article

Difference of dates

I have a script which is printing date in below format while writing the logs. Code: theDate=`date +"%m%d%Y"` theTime=`date +"%H%M%S"` echo $theDate $theTime How can i find out difference current time...

View Article


AIX Frame: NIC port down

NIC port is down on IBM Frame. From the back its slot C7/C8. The network switch is the problem, and a new switch will be coming into play. There's one VIO and one LPAR. How do i tell the port is down...

View Article

Image may be NSFW.
Clik here to view.

Using nested for loop to iterate over file names

I'm trying to grab a list of file names from a directory, then process those files 5 at a time. In the link below. Instead of using files I'm using the files array which contains 15 strings starting...

View Article

Image may be NSFW.
Clik here to view.

Extract the word from the file and print it

I have a file which I am reading and then I need to extract a particualr word and if it matches the line. Code: 2015-01-22 07:30:17,814000 +0900 [29133:main]/INFO:[configuration.manager/Cont'd_0031] -...

View Article


Making a C library function calling a shell script

Hi , I have made a shell script for sending files from one server to another using scp it has following syntax Code: script logicalfilename physicalfilename server I want to call this script through a...

View Article


Grep and append

Have a string as below in a file. " Code: anohter boy has id 000921 and girl has id=655 of roll number " using grep below commands with grep commands but able to get one string at a time, not able to...

View Article

Find and sort by first column value

Hi, I have two text files file 1 with N lines Code: AAAAA        2.092290E-12 BBBBB        1.727740E-07 CCCCC        9.608710E-17 DDDDD        0.000000E+00 EEEEE        0.000000E+00 FFFFF...

View Article

Determine power family of p system from the model #.

Folks, Again a very silly question :D Could someone tell me, how to determine the power family(540, 520, 575, 595 etc) just by looking into the model # info from prtconf/lsconf o/p of the lpar? I dont...

View Article

[perl script] print the assembly instruction and count the occurence

Hi, I have a input file(text file) with the following lines. Code: 0x000000 0x5a80 0x0060 BRA.l 0x60 ;file:UserCall.s ;function:_user_call_table ;C_sourceLine:24 0x000002 0x1bc5 RETI ;file:UserCall.s...

View Article


Find and awk with today's date

Hi All, Solaris 10 o/s With your help I developed the following script. Code: find /oracle/diag/rdbms/*/*/trace -type f -name '*d00*.trc' -mtime 0  -exec  egrep –c  'NS Primary Error' '{}' '+' which...

View Article

Help in understanding how backup and restore works in any organization?

Please take your time to answer/comment. no urgency. it would help upcoming sysadmins like me in understanding how things work in real time. OS: AIX Middleware: Weblogic/WAS Database: Oracle DB/IBM DB2...

View Article


Shell script worked correctly until I added variable :(

Hi everyone, I have been using a shell script for the last 6 months to copy a database from a POS system, then analyse the database and print the current sales total. This has worked flawlessly, the...

View Article

Image may be NSFW.
Clik here to view.

An installation script on freeBSD

Hello So i got my hands on some freebsd iso, installed it in a qcow2 image and installled git and bash. So far, so good. Git repositry retireved install script executed files got copied files have exec...

View Article


Lines of code in egrep question

Hi, I have a question, during my readings it appears that these two variables in the snippet below need to be on the same line to return a “true” answer and listed in the output otherwise it won’t be...

View Article

SFTP function

I have FTP function: Code: FTPfunction () { integer sw=4 ftp -niv <<- !  > $FTPLOG 2>&1 open $1 user $2 $3 put /tmp/ptdata.csv close bye ! but, I need to use sFTP and port 22. Can you...

View Article

How to check last unexpected reboot time Solaris 10?

Dear all can you give me command to show me last unexpected reboot time the date, month, and the year on solaris 10 i've tried uptime who-b last reboot but nothing give me the year last reboot only the...

View Article
Browsing all 16232 articles
Browse latest View live