I am using Sun Solaris 5.8
I am trying to run a system command such as ls and echo inside awk, but when I run the following code system echo is not displayed.
bash-2.03$ ls | awk 'BEGIN {
print "first print"
system("echo system echo")
print "second print"
... (1 Reply)
I was trying commands within awk. i got stuck here. i take 2 files.
cat input
first
second
third
fourth
fifth
sixth
seventh
eighth
ninht
tenthcat add
***************
Nirbhay
***************i run the command
awk '{ if ( NR == 5 ) { print system("cat add") "\n" $0 } else {... (4 Replies)
Hello
I want to hide command line parameters of my programs/scripts to not to be seen with 'ps' command.
How can I do that?
thanks in advance. (6 Replies)
Hi,
By reporting the process status with ps, any Unix user will see the command line arguments
#ps -ef
UID PID PPID C STIME TTY TIME CMD
lsc 13837 13825 0 May 11 pts/17 0:01 -ksh
oracle 4698 6294 0 12:00:40 ? 0:00 sqlplus -s system/manager
appluser 4229 4062 0 12:00:03... (2 Replies)
Hi:
echo "Escriba el nombre de usuario: \c"
read user
lsuser -a $user 2>/dev/null || (echo "Usuario no valido en el sistema. Abortando." && exit 1)
I want:
- If 'lsuser -a $user' fails, script exits but hide stderr.
- If 'lsuser -a $user' succeeds, script continue, and hide stdout.... (10 Replies)
dear All,
my awk system command isn't working or rather I'm missing something in my command. Appreciated , if anyone can assist me what exactly I'm missing ??
awk ' /^/ {
> c=split($3,a,"/") ;for(n=1; n<=c; ++n)
> {
> if (system("test -d" /home/cubedata/20120104/"$1"/"a")) {
> print... (5 Replies)
Hi,
I need to somehow pipe the password to a command and run some SQL, for example, something like echo $password | sqlplus -s system @query01.sql
To make it not so obvious, I decided to try out writing a small C program that basically just do echo $password. So now I just do x9.out | sqlplus... (8 Replies)
I am pulling data from remote SFTP server via LFTP. I really like its features.
I have executed following command through screen.
lftp -u xxxxx,xxxxx -e "set sftp:connect-program 'ssh -a -x -i /sftp/user/downloads/.ssh/id_dsa';mirror -vvv -c /data/ /sftp/user/downloads/2014_ic; quit"... (1 Reply)
Hi,
I have around 10 files in a folder in which I want to change the file format from tab(\t) to pipe(|) with some changes in the fields as well. Below is the code, while tmp file is getting generated but move command is not working, please help
Following is the code
awk -F"\t" '{print... (2 Replies)
Hello Friends,
I'm trying something hard (for me) to create a report script,normally the following script works:
Echos are just for cosmetic touch,
echo -n "\n-----\t----------\t-------------\t\t--------------\t\t--------\n
COUNT\tEVENT_TYPE\tRESPONSE_CODE\t\tINTERNAL_ERROR\t\tFLOWNAME... (7 Replies)