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

Randomize a matrix

Hey guys. I posted a complex problem few days back. No reply! :| Here is simplified question: I have a matrix with 0/1: Code: *        col1  col2  col3 row1    1      0      1 row2    0      0      1...

View Article


Iptable and port forwarding

Hello, I have a routeur linksys (192.168.1.1 ) a firewall (192.168.1.55 IN ----> 192.168.2.254 OUT) which using iptable I want to acces to an equipment (lorex video camera serveur 192.168.2.44)...

View Article


Umask question

Hello All, I was doing some work with umask and want to make sure I'm right. I want newly created files to be executable for the group and the world, writable for the user only, and readable by the...

View Article

Image may be NSFW.
Clik here to view.

Simply Explained

2012-12-09T22:54:30+01:00 Tweet Source...

View Article

Remove the last character (,) for every line in a file

Good afternoon: im working wih 2 files to find differences and use the cmp command Code: cmp file1 file2 file1 file2 are are diifferent char 302 line1 i found what the difference is with the sed...

View Article


How can I read complete word from text file?

how can I know that the word in test file end at this point .... I have an Idea to search on ' ' , '\n' or '\0' but don't know what function can store the string before those characters .. help please !

View Article

Needed script to FTP a File and generate a quality checksum file

hi all i want a script to FTP a file and should generate a quality checksum file means when I FTP a file from one server to another server it should generate a QC file which should contain...

View Article

Sort current logged in users by log in time (supposedly to be very easy but...

1. The problem statement, all variables and given/known data: Show all users who are currently logged in, sorted from earliest to latest log in time. The log in time includes the month, day, and time....

View Article


Atheros AR9271

Hi!! It's possible instal the Atheros AR9271 on Solaris? I never find the driver to Linux or Unix.

View Article


Image may be NSFW.
Clik here to view.

Regarding c-shell (csh) scripting

Hi, I'm reading a csh setup script, and came across these lines: Code: ################################ if (! $?PROJECT_ROOT) then     setenv PROJECT_ROOT /proj/proj_123 endif...

View Article

Trying to ssh as another user and cd to directory

I can ssh to another directory by doing the following: for server in server1; do ssh -t $server1 "cd /tmp; 'ls'";done However, if I try to do it as another user it fails: I have tried: for server in...

View Article

Shell script to print date and no.of records

hi all, i want script to print the output in the following format filename yyyy/mm/dd count where count= no.of records in the file Thanks in advance hemanthsaikumar

View Article

PowerHA with 3rd node for communication

Looking to find PowerHA with 3rd node used for communication (voting node) only. Does anyone use such configuration with IBM products?

View Article


Script to restrict the length of the file name

i want to restrict the filename to 30 bytes.. that means if the file name is 20 bytes it should print the 30 byte name by taking the space as input sample input : unix_shellscripting.txt...

View Article

Image may be NSFW.
Clik here to view.

Need hep with my semantic error

Code: while(EOF != (c = fgetc(filePtr)))  {     if ((c == ' ') || (c == '\n') || (c == '\0'))     {         if (c == '\0')         {             continue;         }                 printf("%s",cc);...

View Article


Unable to echo single quotes inside awk

Code: [root@gofu ~]# echo 'export HISTFILE=/var/log/history/history_$(uname -n)_$(date +%Y:%b:%d:%H:%M)_$(who am i | awk '{print \$1}')' >> new_file [root@gofu ~]# [root@gofu ~]# cat new_file...

View Article

Need to search string from file 1 in one of columns of file 2

hello all. I would like to kindly ask you, if you could help me out with one problem. I have two files -> for ex. file1 and file2 file1 contains only various numbers file 2 contains multiple columns...

View Article


Oracle Variable Passing Test

Hi, I am trying to get the oracle variables and pass the values in sql placed in procedure. VARIABLE vstat='ASDS,FGDS,VCGD,VCXC' Query : select distinct dept from College where section in ('C','D') AND...

View Article

Image may be NSFW.
Clik here to view.

Quick sed/awk question

Hi fellow linux-ers, I have a quick question for you. I have the following text, which I would like to modify: Code: 10 121E(121) 16 Jan 34S 132E 24 Feb 42 176E(176) 18 Sep 21S 164E 25 May 15...

View Article

How to calculate compilation time using c?

is there function with library "time.h" to calculate the processing time of the code?

View Article
Browsing all 16232 articles
Browse latest View live