Sponsored Content
Top Forums Shell Programming and Scripting clear complex javascript code Post 302218019 by fed.linuxgossip on Thursday 24th of July 2008 05:45:08 AM
Old 07-24-2008
era,

Excellent, you are bang on target. can extent you command to perform the operation on JavaScript enclosures only if that contain for example "cIFdYnjSY_NfK4VMKsYJ8xCGY_V Z"


Thanks
 

10 More Discussions You Might Find Interesting

1. Programming

How to clear screen

I searched the post and someone said to clear the screen in C, use printf("\033[2J"); ?? However, this doesn't work...typo or no. What is an equivalent command to 'CLS' in DOS/'clear' in UNIX to clear the screen and go to top of screen?? Thank you. (2 Replies)
Discussion started by: giannicello
2 Replies

2. UNIX for Dummies Questions & Answers

Please help me clear up some confusion

Hello All, I like this forum btw, and have only been lurking for about a day. Recently I purchased some new hardware (AMD Athlon 64 3200+ and a Asus K8V Deluxe Motherboard), and I want to find an OS that can take advantage of the 64 bit processor. Basically, what are the differences... (2 Replies)
Discussion started by: RoY_mUnSoN
2 Replies

3. Programming

clear screen in g++

How do I clear screen in g++ I've included curses and tried compile with lcurses as per gcc but fails, I can clear by using system("clear") but would prefer to use the curses library if possible. (2 Replies)
Discussion started by: gefa
2 Replies

4. UNIX for Dummies Questions & Answers

how to clear history

Hi... i have one doubt pls... 1)can we clear the command line history in UNIX for a paricular login(scadm/root)if so how?. 2) can we see the time at which command executed. history is showing like : 100 display 101 lock 102 exit (7 Replies)
Discussion started by: gincemathew
7 Replies

5. AIX

Clear wtmp

Hello, Is there a difference between the following commands besides consider the file permissions? /usr/sbin/acct/nulladm /var/adm/wtmp >/var/adm/wtmp cat /dev/null >/var/adm/wtmp Today I tried the second command and it worked... (2 Replies)
Discussion started by: x_adm
2 Replies

6. Shell Programming and Scripting

How to use javascript code in unix shell?

Hi Need help...I have wrritten one code for html through shell scripting in that i am using java scripts to validate some condition and open the html page without clicking the button.... Code Details echo "<script type="text/javascript">" echo "function exec_refresh()" echo "{" ... (4 Replies)
Discussion started by: l_gshankar24
4 Replies

7. UNIX for Dummies Questions & Answers

Trying to understand a complex bit of code

Hi, To re-introduce myself, I'm a router guy trying to learn some scripting from the examples in my work place... In a ksh script, one of the script guys wrote the following and I am trying to understand it. I'm hoping someone can explain it to me. The script flow enters a case structure.... (5 Replies)
Discussion started by: Marc G
5 Replies

8. Web Development

Path to javascript source code at local browsing

Where should I put my javascript source code in order to run it "locally" by file not by http?---not sure this "locally" is the appropriate word here. My test is when my javascript code (test.js) is put in the site default folder as the test.html in /var/www/html both worked as expected with... (2 Replies)
Discussion started by: yifangt
2 Replies

9. UNIX for Beginners Questions & Answers

awk not clear

can anyone tell me the working of this logic. here "last" is a variable or it has it own meaning . getting confused. awk '{if (last && $2 != last) {print last, sum; sum=0} sum=sum+ $3; last = $2} END {print last, sum}' (4 Replies)
Discussion started by: scriptor
4 Replies

10. Web Development

JavaScript code - UNIX grep?

Hi I am new to JavaScript & haven't done much work with it, but have mainly experience with UNIX. I have a piece of code where I want to grep (excuse the UNIX language :D) for a id and get the number from that. { "time": 900, "avail": 1, "price": 0, "datetime":... (8 Replies)
Discussion started by: simpsa27
8 Replies
JavaScript::Beautifier(3pm)				User Contributed Perl Documentation			       JavaScript::Beautifier(3pm)

NAME
JavaScript::Beautifier - Beautify Javascript (beautifier for javascript) SYNOPSIS
use JavaScript::Beautifier qw/js_beautify/; my $pretty_js = js_beautify( $js_source_code, { indent_size => 4, indent_character => ' ', } ); DESCRIPTION
This module is mostly a Perl-rewrite of <http://github.com/einars/js-beautify/tree/master/beautify.js> You can check it through <http://jsbeautifier.org/> FUNCTIONS
js_beautify( $js_source_code, $opts ); beautify javascript. options indent_size indent_character if you prefer Tab than Space, try: { indent_size => 1, indent_character => " ", } preserve_newlines default is 1 my $in = "var a=dont_preserve_newlines"; my $out = "var a = dont_preserve_newlines"; my $js = js_beautify( $in, { preserve_newlines => 0 } ); # $out eq $js $in = "var a=do_preserve_newlines"; $out = "var a = do_preserve_newlines"; $js = js_beautify( $in, { preserve_newlines => 1 } ); # $out eq $js space_after_anon_function default is 0 AUTHOR
Fayland Lam, "<fayland at gmail.com>" COPYRIGHT &; LICENSE Copyright 2008 Fayland Lam, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2009-12-30 JavaScript::Beautifier(3pm)
All times are GMT -4. The time now is 03:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy