By rajeevm
I have a requirement which would calculate the Tuesday’s date of the current week in yyyymmdd format in unix shell script.
Please help me out how could I do this .
I appreciate your help
Regards,
raj
By rajeevm
I have a requirement which would calculate the Tuesday’s date of the current week in yyyymmdd format in unix shell script.
Please help me out how could I do this .
I appreciate your help
Regards,
raj
By rafa_fed2
What are other commands like this that we should know
By prvnrk
I have 120GB file on HP-UX and need to split to 4GB pieces and join them on Windows.
As I don’t want to use zipsplit, tried to use split command and join on windows using “copy /b” but it doesn’t work (It merges and creates new file but file is corrupt)
What is the correct way to join UNIX split files on Windows? ( “copy /b” not working correctly)
Or is there solution for it?
Thanks
By lovelysethii
i need to check the latest patch applied on my unix server. here is the server info:
bash-3.2$ uname -a
SunOS usa0300uz1226 5.10 Generic_148888-01 sun4u sparc SUNW,SPARC-Enterprise
please tell which is the command for checking patch?
By harika03
I have an issue where I have to send multiple filenames(only names of the file) through an email and I have to send in a single mail.
For example…Kscik.lk.txt_$currentdate,kscik_ii.txt_$currentdate. I can send it as below
echo “files n Kscik.lk.txt_$currentdate n kscik_ii.txt_$currentdate are available in so n so folder” | mailx -m -s x@g.com.
The above syntax can only send the subject that has two files but I have to send an single email where subject contains all starting with kscik* related files.
Please help on this..
By mahesh300182
I am using a windows RDP machine . from the RDP i am opening a putty session of a unix server.i have outlook installed in the windows RDP machine, and if i get a file inthe outlook mail how can i copy it to a location in the putty unix machine. Please help me!!!!
By Paromita
analyze -format verilog -lib WORK dff_sync_reset.v
Error: *** Presto compilation terminated with 1 errors. ***
elaborate dff_reset_sync –arch “verilog” –lib WORK
Error: Error: Can't find the architecture 'dff_reset_sync(verilog)' in the library 'WORK'
0
I am getting these errors so I think the file is not linked to UNIX. Can you please tell me if I am doing anything wrong.
By Kalaiselvi66
I have created a sql macro, i want to execute this through ksh in putty.ie) sql.ksh will contain the macro query ,once i call this ksh ,the macro should trigger.
I am able to write a macro : for ex:
create macro macro_name
(sel * from db_tablename)
execute macro_name.
Could anyone explain me how to add the above command in a ksh shell script ..i tried by
.logon username/pwd like this…..
but i am not able to…
Thanks in advance
I have a query that is I have a server (unix machhine) to which I login thru winscp or putty , mostly I use putty and at a particular location there is one xml(abc.xml) while which I change , let say
1) I login to first unix box
hostname :- ccc74
username :-bbb
passwd :- ccc
and the location on unix box machine is
/opt/app/al/servers/abc.xml
similiarly there are several unix box machines having hostnames…ccc75, ddd 75, eee76 , fff77 , ggg78 and at the same location there is abc.xml
Now please advise me any script , as rite now I login thru winscp and do the changes manually on each xml , please advise any script:eek:
By saaisiva
SAS Program:
data one ; /* Data step */
Input name $; /*Dec variables*/
I want to remove the commented part(/* Data step */) alone. I have tried using sed command but it is deleting the entire line itself. i need unix command to separate this and get the output as shown below.
Output :
data one ;
Input name $;
By saaisiva
SAS Program:
data one ; /* Data step */
Input name $; /*Dec variables*/
I want to remove the commented part(/* Data step */) alone. I have tried using sed command but it is deleting the entire line itself. i need unix command to separate this and get the output as shown below.
Output :
data one ;
Input name $;
:wall:
———- Post updated at 07:40 AM ———- Previous update was at 07:38 AM ———-
How To display the last modification time of any file in unix
———- Post updated at 07:40 AM ———- Previous update was at 07:40 AM ———-
How to display the contents of any file on the VDU in unix
:wall:
By Pratik4891
Could you help me with my below requirement
In my script I will start a process ,it takes some time to complete the process.After completion it will create a file
after that I have to restart the process again
The number of time it will be done will vary but that count we should know before
so here is the algorithm
for in 1…count
delete indicator file
step 1 start process
step 2 check indicator file exist [ denotes process completed ]
no then sleep for 30 second
go to step 2
else
go to step 1 [run the process again ]
do this until the for loop completed
Could anyone please give me the code or suggestion how to procees
Your help is very much appreciated
By josseossa
# Samba config file created using SWAT
# from 10.18.1.43 (10.18.1.43)
# Date: 2013/07/16 16:00:56
[global]
workgroup = XXXXXX
security = SHARE
passdb backend = tdbsam
guest account = sambapru
log level = 3
log file = /var/log/samba/log.%m
max log size = 50
load printers = No
[public]
comment = Public Stuff
path = /XXXXXX/pruebas31
force user = sambapru
force group = staff
read only = No
guest ok = Yes
I checked the users prmissions on share and they’re ok, this are the permissions on shared folder:
root@YYYYYY:/> ls -dltr /psreports/pruebas31
drwxrwxr-x 5 sambapru staff 256 Jul 16 15:04 /XXXXXXX/pruebas31
and this is the error log when i establish a new connection to share from windows:
[2013/07/16 15:01:45, 3] smbd/process.c:process_smb(1110)
Transaction 1 of length 137
[2013/07/16 15:01:45, 3] smbd/process.c:switch_message(914)
switch message SMBnegprot (pid 618634) conn 0x0
[2013/07/16 15:01:45, 3] smbd/sec_ctx.c:set_sec_ctx(241)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2013/07/16 15:01:45, 3] smbd/negprot.c:reply_negprot(508)
Requested protocol [PC NETWORK PROGRAM 1.0]
[2013/07/16 15:01:45, 3] smbd/negprot.c:reply_negprot(508)
Requested protocol [LANMAN1.0]
[2013/07/16 15:01:45, 3] smbd/negprot.c:reply_negprot(508)
Requested protocol [Windows for Workgroups 3.1a]
[2013/07/16 15:01:45, 3] smbd/negprot.c:reply_negprot(508)
Requested protocol [LM1.2X002]
[2013/07/16 15:01:45, 3] smbd/negprot.c:reply_negprot(508)
Requested protocol [LANMAN2.1]
[2013/07/16 15:01:45, 3] smbd/negprot.c:reply_negprot(508)
Requested protocol [NT LM 0.12]
[2013/07/16 15:01:45, 3] smbd/negprot.c:reply_nt1(360)
not using SPNEGO
[2013/07/16 15:01:45, 3] smbd/negprot.c:reply_negprot(609)
Selected protocol NT LM 0.12
[2013/07/16 15:01:45, 3] smbd/process.c:process_smb(1110)
Transaction 2 of length 246
[2013/07/16 15:01:45, 3] smbd/process.c:switch_message(914)
switch message SMBsesssetupX (pid 618634) conn 0x0
[2013/07/16 15:01:45, 3] smbd/sec_ctx.c:set_sec_ctx(241)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2013/07/16 15:01:45, 3] ...read more
By AraR87
I am trying to connect to Unix server to windows share point using ftp or fstp. I want to get excel file from windows share to unix server.
But i am not able to do it. Can you please help me on this. :confused:
Cheers
By DevendraG
I would like to sort a list in different ways:
1> Unique based on Field 1 with highest Field 4
For Instance Input:
1678923450;11112222333344;11-1x;2_File.xml
1678923450;11112222333344;11-1x;5_File.xml
1234567890;11113333222244;11-1x;3_File.xml
Output:
1234567890;11113333222244;11-1x;3_File.xml
1678923450;11112222333344;11-1x;5_File.xml
2> Unique based on Field 2, then Field 1 with highest Field 4
For Instance Input:
1234567890;11113333222244;11-1x;3_File.xml
1234567890;11112222333344;11-1x;1_File.xml
1678923450;11112222333344;11-1x;2_File.xml
Output:
1234567890;11112222333344;11-1x;1_File.xml
1678923450;11112222333344;11-1x;2_File.xml
1234567890;11113333222244;11-1x;3_File.xml
By Paul R
echo $RANDOM > /dev/tty
QUESTION #1: How can the random number, which is output to the terminal by this script, be captured in a variable?
QUESTION #2: How can this be done in a cron job?
Specific code, whether in ksh or C, would be greatly appreciated.
———————————————————————
REAL LIFE STORY: We use software with concurrent licenses, which are managed on a UNIX server. The vendor supplies a program which simply displays the number of licenses currently being used, but it directs the output to /dev/tty (not stdout/stderr/file), and it is a compiled program so it cannot be directly altered using sudo permissions. I can only assume that the vendor is actively trying to prevent their customers from gathering statistics about their concurrent license usage, because the customer might find out they don’t need so many licenses, contract for fewer licenses, and thus the vendor would loose money. 😡 The vendor has to provide some mechanism for determining license usage, but it’s extremely limited. 🙁 I would like to gather statistics every 15 minutes, find the maximum concurrent license usage, so we can contract to the vendor for the ideal number of licenses. 😀 Any help you can provide would be greatly appreciated. Thanks! –Paul.
hello how are you
my chemistry book is lost
what is up
etc...
And I want the output to be:
you are how hello
lost is book chemistry my
up is what
....
I found an earlier response to a similar question but it was not accurate as it required a certain string length for each line
By RoshniMehta
regards
Roshni
By mike_bn
i am a Unix beginner and to test the rules of file rights (rwx)
i created the file
/root/testdir/subdir/test.sh
and set the rights of testdir,subdir, test.sh (using chmod) to various configurations in order to get an idea
in which case you need which rights. Test commands were
– ls (‘Can i read the directory in certain change-mod configurations?’)
– less test.sh (‘What are the requirements in terms of rights to be able to read a file?’)
– test.sh (‘When can i execute a file?’)
My question is, when testing unix access rights, is there a difference
between referencing test.sh by
./tests. and /root/testdir/subdir/test.sh?
I know that for the first command, i need to be in the directory, but in terms of
access rights, are these to ways of referencing the file test.sh totally equivalent? In other words, does
‘less ./test.sh’ always work when ‘less /root/testdir/subdir/test.sh’ and vice versa?
Or is there a configuration for the rights of testdir and/or subdir where one works, and the other not? Same question with executing.
Thands in advance for your help!
Mike